Fix crash when reloading with placement tool enabled

Paint Cursors are already released at this stage.
This commit is contained in:
Germano Cavalcante 2021-10-20 09:07:26 -03:00
parent ba4e227def
commit 40180c3500
1 changed files with 1 additions and 1 deletions

View File

@ -879,7 +879,7 @@ static void v3d_cursor_snap_activate(void)
static void v3d_cursor_snap_free(void)
{
SnapCursorDataIntern *data_intern = &g_data_intern;
if (data_intern->handle) {
if (data_intern->handle && G_MAIN->wm.first) {
WM_paint_cursor_end(data_intern->handle);
data_intern->handle = NULL;
}