src/text.c

changeset 24
7183b4ae9b20
parent 23
ab07757004b4
child 25
601b3f4e17a2
equal deleted inserted replaced
23:ab07757004b4 24:7183b4ae9b20
40 } 40 }
41 41
42 node->position = (asc_vec2i) {x, y}; 42 node->position = (asc_vec2i) {x, y};
43 node->font = asc_context.active_font; 43 node->font = asc_context.active_font;
44 node->color = asc_context.ink; 44 node->color = asc_context.ink;
45 node->text = strdup(text); 45 if (text != NULL) {
46 node->text = strdup(text);
47 }
46 48
47 return node; 49 return node;
48 } 50 }
49 51
50 void asc_text_update(AscTextNode *node) { 52 void asc_text_update(AscTextNode *node) {

mercurial