Fix T56666: Crash typing "w" in the search function.
One shall check object is a GPencil one, before trying to use ob->data...
This commit is contained in:
parent
101b2ce7b6
commit
f922881620
Notes:
blender-bot
2023-02-14 10:29:30 +01:00
Referenced by issue #56666, Crash typing "w" in the search function
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue