Fix crash using transform with grease pencil without an "area"

This commit is contained in:
Campbell Barton
2025-03-07 20:11:51 +11:00
parent 084cb40e98
commit 5849d9aec3

View File

@@ -220,7 +220,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
/* Grease Pencil editing context. */
if (t->obedit_type == OB_GREASE_PENCIL && object_mode == OB_MODE_EDIT &&
(area->spacetype == SPACE_VIEW3D))
((area == nullptr) || (area->spacetype == SPACE_VIEW3D)))
{
t->options |= CTX_GPENCIL_STROKES;
}