diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 04:49:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 07:32:40 +0300 |
commit | 33da997193b570f12db57fabcbe02e7283b7bbfc (patch) | |
tree | 092bc162d034f17c6c72fde5c0a490b5d3f13f85 /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 52cff88f72674ff77638a5e60d8837e6c715b34e (diff) |
Fix crashes from various missing checks in operator poll functions
Issues exposed by 'bl_run_operators.py' utility.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 83ecb3ab42f..1b42334499e 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1379,7 +1379,8 @@ void GPENCIL_OT_copy(wmOperatorType *ot) static bool gp_strokes_paste_poll(bContext *C) { - if (CTX_wm_area(C)->spacetype != SPACE_VIEW3D) { + ScrArea *sa = CTX_wm_area(C); + if (!((sa != NULL) && (sa->spacetype == SPACE_VIEW3D))) { return false; } /* 1) Must have GP datablock to paste to |