Skip to content

Commit

Permalink
kernel: When destroying a RES window, only free the loaded resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Jun 17, 2024
1 parent e2e69a0 commit 6701989
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kernel/window/window.asm
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,18 @@ destroy_window_no_more_windows:

; free WIN resource
mov r0, [r2+12]
call free_memory
cmp r0, 0
ifnz call free_memory

; free MNU resource
mov r0, [r2+28]
call free_memory
cmp r0, 0
ifnz call free_memory

; free WID resource
mov r0, [r2+32]
call free_memory
cmp r0, 0
ifnz call free_memory
destroy_window_not_res:
; free framebuffer memory
mov r0, [r2]
Expand Down

0 comments on commit 6701989

Please sign in to comment.