From 6586cbca30c11cf6b685961ef1546b7baaac1bb0 Mon Sep 17 00:00:00 2001 From: Marius Petcu Date: Mon, 31 Dec 2018 13:03:53 +0200 Subject: [PATCH] Fix Windows crash --- defos/src/defos_win.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/defos/src/defos_win.cpp b/defos/src/defos_win.cpp index b3fee9a..4f57ad5 100644 --- a/defos/src/defos_win.cpp +++ b/defos/src/defos_win.cpp @@ -432,6 +432,7 @@ void * defos_load_cursor_win(const char *filename) void defos_gc_custom_cursor(void * _cursor) { CustomCursor * cursor = (CustomCursor*)_cursor; + if (!cursor) { return; } cursor->ref_count -= 1; if (!cursor->ref_count) { delete cursor;