summaryrefslogtreecommitdiff
path: root/src/ui/labelwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r--src/ui/labelwidget.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index b84e17f4..03595d1a 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -551,10 +551,12 @@ void updateText_LabelWidget(iLabelWidget *d, const iString *text) {
551} 551}
552 552
553void updateTextCStr_LabelWidget(iLabelWidget *d, const char *text) { 553void updateTextCStr_LabelWidget(iLabelWidget *d, const char *text) {
554 setCStr_String(&d->label, text); 554 if (d) {
555 set_String(&d->srcLabel, &d->label); 555 setCStr_String(&d->label, text);
556 replaceVariables_LabelWidget_(d); 556 set_String(&d->srcLabel, &d->label);
557 refresh_Widget(&d->widget); 557 replaceVariables_LabelWidget_(d);
558 refresh_Widget(&d->widget);
559 }
558} 560}
559 561
560void updateTextAndResizeWidthCStr_LabelWidget(iLabelWidget *d, const char *text) { 562void updateTextAndResizeWidthCStr_LabelWidget(iLabelWidget *d, const char *text) {