[Bf-blender-cvs] [533d146f48d] master: Fix T72976: CRASH When Selecting Camera

Antonio Vazquez noreply at git.blender.org
Wed Jan 8 22:46:57 CET 2020


Commit: 533d146f48d1a12c75506c4fca38f577902b79bf
Author: Antonio Vazquez
Date:   Wed Jan 8 22:46:50 2020 +0100
Branches: master
https://developer.blender.org/rB533d146f48d1a12c75506c4fca38f577902b79bf

Fix T72976: CRASH When Selecting Camera

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

M	source/blender/editors/gpencil/gpencil_utils.c

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

diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 9de3c32e05e..9b1551fe2a5 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -365,7 +365,7 @@ bool gp_add_poll(bContext *C)
 bool gp_active_layer_poll(bContext *C)
 {
   Object *ob = CTX_data_active_object(C);
-  if (ob == NULL) {
+  if ((ob == NULL) || (ob->type != OB_GPENCIL)) {
     return false;
   }
   bGPdata *gpd = (bGPdata *)ob->data;



More information about the Bf-blender-cvs mailing list