diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-15 01:35:55 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-15 01:35:57 +0300 |
commit | 9fbada4a3bc66b3d5b60070da685fb5c741a56b0 (patch) | |
tree | d0e0a06daace5280ddb97de37e617c8b61564a70 /source/blender/editors/gpencil/gpencil_armature.c | |
parent | fa41350c720b56ecfd3fca0be4c0f7cce5a96c96 (diff) |
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 :)
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_armature.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_armature.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |