summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 754545bd..6fa3e293 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -768,7 +768,7 @@ iLabelWidget *makeMenuButton_LabelWidget(const char *label, const iMenuItem *ite
768/*-----------------------------------------------------------------------------------------------*/ 768/*-----------------------------------------------------------------------------------------------*/
769 769
770static iBool isTabPage_Widget_(const iWidget *tabs, const iWidget *page) { 770static iBool isTabPage_Widget_(const iWidget *tabs, const iWidget *page) {
771 return page->parent == findChild_Widget(tabs, "tabs.pages"); 771 return page && page->parent == findChild_Widget(tabs, "tabs.pages");
772} 772}
773 773
774static iBool tabSwitcher_(iWidget *tabs, const char *cmd) { 774static iBool tabSwitcher_(iWidget *tabs, const char *cmd) {
@@ -787,7 +787,7 @@ static iBool tabSwitcher_(iWidget *tabs, const char *cmd) {
787 } 787 }
788 else if (hasParent_Widget(target, tabs)) { 788 else if (hasParent_Widget(target, tabs)) {
789 /* Some widget on a page. */ 789 /* Some widget on a page. */
790 while (!isTabPage_Widget_(tabs, target)) { 790 while (target && !isTabPage_Widget_(tabs, target)) {
791 target = target->parent; 791 target = target->parent;
792 } 792 }
793 showTabPage_Widget(tabs, target); 793 showTabPage_Widget(tabs, target);