Fix minor glitches in GP code.

Reported by coverity scan.
This commit is contained in:
Bastien Montagne 2017-01-20 18:46:06 +01:00
parent a97ec403c2
commit 475d536f72
2 changed files with 5 additions and 7 deletions

@ -1563,7 +1563,7 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i
{
bGPdata *gpd_source = NULL;
ToolSettings *ts;
bGPDbrush *brush;
bGPDbrush *brush = NULL;
if (scene) {
ts = scene->toolsettings;
brush = BKE_gpencil_brush_getactive(ts);
@ -1572,8 +1572,7 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i
BKE_gpencil_brush_init_presets(ts);
brush = BKE_gpencil_brush_getactive(ts);
}
}
if (scene) {
if (spacetype == SPACE_VIEW3D) {
gpd_source = (scene->gpd ? scene->gpd : NULL);
}
@ -1587,7 +1586,6 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i
gp_draw_data(brush, ts->gp_sculpt.alpha, gpd_source,
offsx, offsy, winx, winy, cfra, dflag);
}
}
}

@ -735,7 +735,7 @@ static float gp_interpolate_seq_easing_calc(GP_Interpolate_Settings *ipo_setting
}
break;
case BEZT_IPO_CIRC:
case GP_IPO_CIRC:
switch (easing) {
case BEZT_IPO_EASE_IN:
result = BLI_easing_circ_ease_in(time, begin, change, duration);
@ -753,7 +753,7 @@ static float gp_interpolate_seq_easing_calc(GP_Interpolate_Settings *ipo_setting
}
break;
case BEZT_IPO_CUBIC:
case GP_IPO_CUBIC:
switch (easing) {
case BEZT_IPO_EASE_IN:
result = BLI_easing_cubic_ease_in(time, begin, change, duration);