Fix crash in rB37493fb9f - there is no guaranty CTX_wm_foo() will return a valid pointer!

This commit is contained in:
Bastien Montagne
2016-04-19 22:51:46 +02:00
parent 11c9ff1edd
commit ccbfbeba74

View File

@@ -1509,7 +1509,7 @@ void ED_region_init(bContext *C, ARegion *ar)
void ED_region_cursor_set(wmWindow *win, ScrArea *sa, ARegion *ar) void ED_region_cursor_set(wmWindow *win, ScrArea *sa, ARegion *ar)
{ {
if (ar->type && ar->type->cursor) { if (ar && sa && ar->type && ar->type->cursor) {
ar->type->cursor(win, sa, ar); ar->type->cursor(win, sa, ar);
} }
else { else {