From 42bb54ff55ae6e2e2c6bf8a5581d14c1289f0234 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 24 Aug 2020 16:24:40 +0300 Subject: SidebarWidget: List identities as sidebar items --- src/ui/util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ui/util.c') diff --git a/src/ui/util.c b/src/ui/util.c index b3178e34..e6067ab9 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -689,9 +689,11 @@ iWidget *makeQuestion_Widget(const char *title, } void setToggle_Widget(iWidget *d, iBool active) { - setFlags_Widget(d, selected_WidgetFlag, active); - updateText_LabelWidget((iLabelWidget *) d, - collectNewFormat_String("%s", isSelected_Widget(d) ? "YES" : "NO")); + if (d) { + setFlags_Widget(d, selected_WidgetFlag, active); + updateText_LabelWidget((iLabelWidget *) d, + collectNewFormat_String("%s", isSelected_Widget(d) ? "YES" : "NO")); + } } static iBool toggleHandler_(iWidget *d, const char *cmd) { -- cgit v1.2.3