Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-09-03 17:05:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-09-03 17:06:56 +0300
commitf92288162016ca7b256a940d0b78f33659ee387e (patch)
treeed98d66b49b780be4b2a3f2911f88ce7414426d7 /source/blender/editors/gpencil/gpencil_armature.c
parent101b2ce7b6f1478df965229964d417a15fb7175a (diff)
Fix T56666: Crash typing "w" in the search function.
One shall check object is a GPencil one, before trying to use ob->data...
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_armature.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 57e15250ed2..0bd6989be73 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -527,6 +527,11 @@ bool ED_gpencil_add_armature_weights(
static bool gpencil_generate_weights_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
+
+ if (ob->type != OB_GPENCIL) {
+ return false;
+ }
+
ViewLayer *view_layer = CTX_data_view_layer(C);
bGPdata *gpd = (bGPdata *)ob->data;