From a116912fd62d9d611bb767b5b6ee90b311cb52c7 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 8 May 2020 11:48:02 +0200 Subject: Fix (unreported) greasepencil crash calling transform_fill from outside 3DView Operator relies on 3DView, poll for it. Spotted while looking into T76522. Reviewers: antoniov Differential Revision: https://developer.blender.org/D7665 --- source/blender/editors/gpencil/gpencil_uv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c index 114d916d1e2..2238d768bcd 100644 --- a/source/blender/editors/gpencil/gpencil_uv.c +++ b/source/blender/editors/gpencil/gpencil_uv.c @@ -377,6 +377,9 @@ static int gpencil_transform_fill_exec(bContext *C, wmOperator *op) static bool gpencil_transform_fill_poll(bContext *C) { + if (!ED_operator_view3d_active(C)) { + return false; + } Object *ob = CTX_data_active_object(C); if ((ob == NULL) || (ob->type != OB_GPENCIL)) { return false; -- cgit v1.2.3