[Bf-blender-cvs] [9fbada4a3bc] blender2.8: Fix T59388: Blender crash upon F3 command search in VSE

Dalai Felinto noreply at git.blender.org
Fri Dec 14 23:41:33 CET 2018


Commit: 9fbada4a3bc66b3d5b60070da685fb5c741a56b0
Author: Dalai Felinto
Date:   Fri Dec 14 20:35:55 2018 -0200
Branches: blender2.8
https://developer.blender.org/rB9fbada4a3bc66b3d5b60070da685fb5c741a56b0

Fix T59388: Blender crash upon F3 command search in VSE

We may not have an active object depending on where the operator is called from
or well if we simply don't have an active object :)

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 85c175d03d7..d554a6bd7f2 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -528,6 +528,10 @@ static bool gpencil_generate_weights_poll(bContext *C)
 {
 	Object *ob = CTX_data_active_object(C);
 
+	if (ob == NULL) {
+		return false;
+	}
+
 	if (ob->type != OB_GPENCIL) {
 		return false;
 	}



More information about the Bf-blender-cvs mailing list