Commit: acd903e16ec7fd4a85a5065e664cbecabe1c245c
Author: Antonio Vazquez
Date:   Mon Feb 12 17:01:00 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBacd903e16ec7fd4a85a5065e664cbecabe1c245c

Cleanup style

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

M       source/blender/editors/object/object_select.c

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

diff --git a/source/blender/editors/object/object_select.c 
b/source/blender/editors/object/object_select.c
index 7dbac5e09f4..3441e42bc16 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -139,13 +139,16 @@ void ED_object_base_activate(bContext *C, Base *base)
 
        eObjectMode object_mode = workspace->object_mode;
        workspace->object_mode = OB_MODE_OBJECT;
+       
        view_layer->basact = base;
 
        /* grease pencil modes */
-       if ((base->object) && (base->object->type == OB_GPENCIL)) {
-               if (base->object->data) {
-                       bGPdata *gpd = (bGPdata *)base->object->data;
+       if ((base) && (base->object)) {
+               Object *ob = base->object;
+               if ((ob->type == OB_GPENCIL) && (ob->data)) {
+                       bGPdata *gpd = (bGPdata *)ob->data;
                        reset = true;
+
                        if (gpd->flag & GP_DATA_STROKE_EDITMODE) { 
                                workspace->object_mode = OB_MODE_GPENCIL_EDIT;
                        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to