Fix crash when open default template

As soon you select the default template, Blender crash on Winodws.

This was introduced in commit {0b626703}
This commit is contained in:
Antonio Vazquez
2020-02-22 16:20:08 +01:00
parent 0b626703f9
commit fb47c131df

View File

@@ -554,7 +554,7 @@ static void ui_popup_block_remove(bContext *C, uiPopupBlockHandle *handle)
CTX_wm_region_set(C, ctx_ar);
/* reset to region cursor (only if there's not another menu open) */
if (BLI_listbase_is_empty(&sc->regionbase)) {
if ((ctx_sa != NULL) && (BLI_listbase_is_empty(&sc->regionbase))) {
ctx_sa->flag |= AREA_FLAG_CURSOR_UPDATE;
}