summaryrefslogtreecommitdiffstats
path: root/ScreenTabsPanel.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-10-27 22:41:58 +0200
committerBenny Baumann <BenBE@geshi.org>2023-10-27 22:42:12 +0200
commita06ff08f21e19a408591c73581fe8a01dcfb4e60 (patch)
treeb4c11240317bf691a3beb371d284df702e735f22 /ScreenTabsPanel.c
parent88f7ca4a75e0efc2bdcd50ff481d09272913b96a (diff)
Avoid NULL pointer deref
Fixes: #1320
Diffstat (limited to 'ScreenTabsPanel.c')
-rw-r--r--ScreenTabsPanel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ScreenTabsPanel.c b/ScreenTabsPanel.c
index 4f9da240..571db71f 100644
--- a/ScreenTabsPanel.c
+++ b/ScreenTabsPanel.c
@@ -99,7 +99,9 @@ static HandlerResult ScreenTabsPanel_eventHandler(Panel* super, int ch) {
}
if (result == HANDLED) {
ScreenTabListItem* focus = (ScreenTabListItem*) Panel_getSelected(super);
- ScreenNamesPanel_fill(this->names, focus->ds);
+ if (focus) {
+ ScreenNamesPanel_fill(this->names, focus->ds);
+ }
}
return result;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy