diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 4b5cd623..11ea0674 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -193,7 +193,10 @@ void setMode_InputWidget(iInputWidget *d, enum iInputMode mode) { | |||
193 | } | 193 | } |
194 | 194 | ||
195 | const iString *text_InputWidget(const iInputWidget *d) { | 195 | const iString *text_InputWidget(const iInputWidget *d) { |
196 | return collect_String(newUnicodeN_String(constData_Array(&d->text), size_Array(&d->text))); | 196 | if (d) { |
197 | return collect_String(newUnicodeN_String(constData_Array(&d->text), size_Array(&d->text))); | ||
198 | } | ||
199 | return collectNew_String(); | ||
197 | } | 200 | } |
198 | 201 | ||
199 | void setMaxLen_InputWidget(iInputWidget *d, size_t maxLen) { | 202 | void setMaxLen_InputWidget(iInputWidget *d, size_t maxLen) { |