Commit: 5b633d7abed43f4da000cfb7fb271a27313bdcd3 Author: Joshua Leung Date: Thu Apr 26 15:31:38 2018 +0200 Branches: greasepencil-object https://developer.blender.org/rB5b633d7abed43f4da000cfb7fb271a27313bdcd3
Fix several compiler warnings =================================================================== M source/blender/editors/gpencil/gpencil_colorpick.c M source/blender/editors/gpencil/gpencil_data.c =================================================================== diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c index 5fd9a9f07f2..f127d6d65f5 100644 --- a/source/blender/editors/gpencil/gpencil_colorpick.c +++ b/source/blender/editors/gpencil/gpencil_colorpick.c @@ -295,8 +295,6 @@ static tGPDpick *gpencil_colorpick_init(bContext *C, wmOperator *op, const wmEve /* define initial values */ ToolSettings *ts = CTX_data_tool_settings(C); - bGPdata *gpd = CTX_data_gpencil_data(C); - Main *bmain = CTX_data_main(C); /* set current scene and window info */ tgpk->win = CTX_wm_window(C); diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 591fa6bd788..010365dc47d 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -1970,11 +1970,11 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op) static int gpencil_active_color_poll(bContext *C) { Object *ob = CTX_data_active_object(C); - short *totcolp; - if (ob) { - totcolp = give_totcolp(ob); + if (ob && ob->data && (ob->type == OB_GPENCIL)) { + short *totcolp = give_totcolp(ob); + return *totcolp > 0; } - return ((ED_gpencil_data_get_active(C) != NULL) && (totcolp > 0)); + return false; } @@ -2337,7 +2337,7 @@ static int gpencil_color_select_exec(bContext *C, wmOperator *UNUSED(op)) continue; /* select */ - if (ob->actcol = gps->mat_nr) { + if (ob->actcol == gps->mat_nr) { bGPDspoint *pt; int i; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs