summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c5
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
195const iString *text_InputWidget(const iInputWidget *d) { 195const 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
199void setMaxLen_InputWidget(iInputWidget *d, size_t maxLen) { 202void setMaxLen_InputWidget(iInputWidget *d, size_t maxLen) {