[Bf-blender-cvs] [e1023560df7] greasepencil-object: Fix crashes on startup

Joshua Leung noreply at git.blender.org
Sat Nov 4 05:47:33 CET 2017


Commit: e1023560df7b9e9cfc261abfb567ddb3fa8013f4
Author: Joshua Leung
Date:   Sun Oct 29 12:10:01 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBe1023560df7b9e9cfc261abfb567ddb3fa8013f4

Fix crashes on startup

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

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 b93d470742c..306178bb165 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -226,7 +226,7 @@ bGPdata *ED_gpencil_data_get_active_v3d(Scene *scene, View3D *v3d)
 /* Check whether there's an active GP keyframe on the current frame */
 bool ED_gpencil_has_keyframe_v3d(Scene *UNUSED(scene), Object *ob, int cfra)
 {
-	if (ob && ob->data) {
+	if (ob && ob->data && (ob->type == OB_GPENCIL)) {
 		bGPDlayer *gpl = BKE_gpencil_layer_getactive(ob->data);
 		if (gpl) {
 			if (gpl->actframe) {



More information about the Bf-blender-cvs mailing list