Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-06-02 03:49:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-06-02 03:50:53 +0300
commit8b63c6241db928de3729e560d8c723a4849924b4 (patch)
tree271d18a9d7ef1882adee1e5b0f084674185495d4 /source/blender/editors/gizmo_library
parent1d4bae856690c7a4603789509a5842dd6b5f8be1 (diff)
Fix snap3d crash (missing NULL check)
Diffstat (limited to 'source/blender/editors/gizmo_library')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
index 1ed02bd6cb9..a3921791427 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
@@ -413,7 +413,7 @@ static int gizmo_snap_test_select(bContext *C, wmGizmo *gz, const int mval[2])
RNA_enum_value_from_id(gizmo_snap->keymap->modal_items, "SNAP_ON", &gizmo_snap->snap_on);
}
- const bool invert = invert_snap(gz, wm, wm->winactive->eventstate);
+ const bool invert = wm->winactive ? invert_snap(gz, wm, wm->winactive->eventstate) : false;
if (gizmo_snap->invert_snap == invert && gizmo_snap->mval[0] == mval[0] &&
gizmo_snap->mval[1] == mval[1]) {
/* Performance, do not update. */