forked from bartvdbraak/blender
Fix crashes with timers.
Incorrectly accessing the menu pointer, set it to NULL before doing the tests. We don't restore the menu pointer because it is invalid by the time the operator ends.
This commit is contained in:
parent
070ce416b9
commit
98a78963be
@ -4354,6 +4354,7 @@ static void redraw_timer_window_swap(bContext *C)
|
|||||||
{
|
{
|
||||||
wmWindow *win = CTX_wm_window(C);
|
wmWindow *win = CTX_wm_window(C);
|
||||||
ScrArea *sa;
|
ScrArea *sa;
|
||||||
|
CTX_wm_menu_set(C, NULL);
|
||||||
|
|
||||||
for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next)
|
for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next)
|
||||||
ED_area_tag_redraw(sa);
|
ED_area_tag_redraw(sa);
|
||||||
@ -4392,7 +4393,8 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
else if (type == 1) {
|
else if (type == 1) {
|
||||||
wmWindow *win = CTX_wm_window(C);
|
wmWindow *win = CTX_wm_window(C);
|
||||||
|
CTX_wm_menu_set(C, NULL);
|
||||||
|
|
||||||
ED_region_tag_redraw(ar);
|
ED_region_tag_redraw(ar);
|
||||||
wm_draw_update(C);
|
wm_draw_update(C);
|
||||||
|
|
||||||
@ -4405,6 +4407,8 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
|
|||||||
ScrArea *sa_back = CTX_wm_area(C);
|
ScrArea *sa_back = CTX_wm_area(C);
|
||||||
ARegion *ar_back = CTX_wm_region(C);
|
ARegion *ar_back = CTX_wm_region(C);
|
||||||
|
|
||||||
|
CTX_wm_menu_set(C, NULL);
|
||||||
|
|
||||||
for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next) {
|
for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next) {
|
||||||
ARegion *ar_iter;
|
ARegion *ar_iter;
|
||||||
CTX_wm_area_set(C, sa);
|
CTX_wm_area_set(C, sa);
|
||||||
|
Loading…
Reference in New Issue
Block a user