Fix snap3d crash (missing NULL check)

This commit is contained in:
Campbell Barton 2020-06-02 10:49:24 +10:00
parent 1d4bae8566
commit 8b63c6241d
1 changed files with 1 additions and 1 deletions

View File

@ -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. */