From d8c0874b7caf4dec4403cb8c4205b7f45f620d38 Mon Sep 17 00:00:00 2001 From: Ry Date: Tue, 24 Jan 2023 17:19:17 -0800 Subject: [PATCH] barclock: Fix crash when there is no active window --- applications/barclock/main.asm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/applications/barclock/main.asm b/applications/barclock/main.asm index d1e553e..6f55b1e 100644 --- a/applications/barclock/main.asm +++ b/applications/barclock/main.asm @@ -45,6 +45,12 @@ loop_end: draw_window_title: mov [active_window_struct_ptr], r0 + ; if there is no active window, clear the menu bar and return + cmp r0, 0 + ifz call clear_menu_bar + cmp r0, 0 + ifz ret + ; get the title string pointer add r0, 12 mov r0, [r0]