ui/common/context.c

changeset 143
d499b29d7cb6
parent 142
46448d38885c
child 145
853685152c1d
--- a/ui/common/context.c	Sat Nov 11 08:34:06 2017 +0100
+++ b/ui/common/context.c	Sat Nov 11 11:59:06 2017 +0100
@@ -245,6 +245,7 @@
         case UI_VAR_INTEGER: {
             UiInteger *f = from->value;
             UiInteger *t = to->value;
+            if(!f->obj) break;
             uic_int_copy(f, t);
             t->set(t, t->value);
             break;
@@ -252,6 +253,7 @@
         case UI_VAR_STRING: {
             UiString *f = from->value;
             UiString *t = to->value;
+            if(!f->obj) break;
             uic_string_copy(f, t);
             char *tvalue = t->value.ptr ? t->value.ptr : "";
             t->set(t, tvalue);
@@ -260,6 +262,7 @@
         case UI_VAR_TEXT: {
             UiText *f = from->value;
             UiText *t = to->value;
+            if(!f->obj) break;
             uic_text_copy(f, t);
             char *tvalue = t->value.ptr ? t->value.ptr : "";
             t->set(t, tvalue);
@@ -269,12 +272,14 @@
         case UI_VAR_LIST: {
             UiList *f = from->value;
             UiList *t = to->value;
+            if(!f->obj) break;
             uic_list_copy(f, t);
             t->update(t, -1);
         }
         case UI_VAR_RANGE: {
             UiRange *f = from->value;
             UiRange *t = to->value;
+            if(!f->obj) break;
             uic_range_copy(f, t);
             t->setextent(t, t->extent);
             t->setrange(t, t->min, t->max);

mercurial