Commit: a116912fd62d9d611bb767b5b6ee90b311cb52c7
Author: Philipp Oeser
Date:   Fri May 8 11:48:02 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa116912fd62d9d611bb767b5b6ee90b311cb52c7

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

===================================================================

M       source/blender/editors/gpencil/gpencil_uv.c

===================================================================

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;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to