[Bf-blender-cvs] [46b6c977371] greasepencil-object: GPencil: Add a comment to tag pending change in gizmo

Antonioya noreply at git.blender.org
Mon Mar 4 19:28:59 CET 2019


Commit: 46b6c977371f30ef301aba79ac9964de61c12307
Author: Antonioya
Date:   Mon Mar 4 19:28:35 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB46b6c977371f30ef301aba79ac9964de61c12307

GPencil: Add a comment to tag pending change in gizmo

This comment is to tag this line to be removed when OB_MODE_EDIT_GPENCIL will be merged into OB_MODE_EDIT.

===================================================================

M	source/blender/editors/transform/transform_gizmo_extrude_3d.c

===================================================================

diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
index 280bd8d36fb..81f4ec8c30a 100644
--- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
@@ -148,8 +148,9 @@ static void gizmo_mesh_extrude_setup(const bContext *C, wmGizmoGroup *gzgroup)
 		const Object *obedit = CTX_data_edit_object(C);
 		const char *op_idname = NULL;
 		/* grease pencil does not use obedit */
+		/* GPXX: Remove if OB_MODE_EDIT_GPENCIL is merged with OB_MODE_EDIT */
 		const Object *ob = CTX_data_active_object(C);
-		if (ob->type == OB_GPENCIL) {
+		if ((ob) && (ob->type == OB_GPENCIL)) {
 			op_idname = "GPENCIL_OT_extrude_move";
 		}
 		else if (obedit->type == OB_MESH) {



More information about the Bf-blender-cvs mailing list