From 533d146f48d1a12c75506c4fca38f577902b79bf Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 8 Jan 2020 22:46:50 +0100 Subject: Fix T72976: CRASH When Selecting Camera --- source/blender/editors/gpencil/gpencil_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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; -- cgit v1.2.3