diff options
-rw-r--r-- | src/ui/widget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index cfd119cb..c8db73dc 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -140,7 +140,7 @@ void setPos_Widget(iWidget *d, iInt2 pos) { | |||
140 | setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue); | 140 | setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue); |
141 | } | 141 | } |
142 | 142 | ||
143 | void setSize_Widget(iWidget *d, iInt2 size) { | 143 | void setSize_Widget(iWidget *d, iInt2 size) { |
144 | d->rect.size = size; | 144 | d->rect.size = size; |
145 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); | 145 | setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); |
146 | } | 146 | } |
@@ -687,8 +687,11 @@ iBool isHover_Widget(const iAnyObject *d) { | |||
687 | } | 687 | } |
688 | 688 | ||
689 | iBool isSelected_Widget(const iAnyObject *d) { | 689 | iBool isSelected_Widget(const iAnyObject *d) { |
690 | iAssert(isInstance_Object(d, &Class_Widget)); | 690 | if (d) { |
691 | return d && (flags_Widget(d) & selected_WidgetFlag) != 0; | 691 | iAssert(isInstance_Object(d, &Class_Widget)); |
692 | return (flags_Widget(d) & selected_WidgetFlag) != 0; | ||
693 | } | ||
694 | return iFalse; | ||
692 | } | 695 | } |
693 | 696 | ||
694 | iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) { | 697 | iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) { |