kernel: Don't crash when all windows are closed
This commit is contained in:
parent
1d70da41a9
commit
1e6e925d08
|
@ -202,6 +202,8 @@ destroy_window:
|
|||
; set the active window to whatever entry is found first
|
||||
call search_for_nonempty_window_list_entry
|
||||
mov.8 [active_window_offset], r0
|
||||
cmp r0, 0xFFFFFFFF
|
||||
ifz jmp destroy_window_no_more_windows
|
||||
|
||||
; set the menu bar for the newly active window
|
||||
call window_list_offset_to_struct
|
||||
|
@ -214,6 +216,12 @@ destroy_window:
|
|||
cmp r0, 0
|
||||
ifnz call draw_menu_bar_root_items
|
||||
|
||||
pop r1
|
||||
pop r0
|
||||
ret
|
||||
destroy_window_no_more_windows:
|
||||
call disable_menu_bar
|
||||
|
||||
pop r1
|
||||
pop r0
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue
Block a user