mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 19:33:28 +00:00
allow null value
This commit is contained in:
@@ -370,7 +370,7 @@ void MwSetText(MwWidget handle, const char* key, const char* value) {
|
|||||||
if(strcmp(key, MwNtitle) == 0) {
|
if(strcmp(key, MwNtitle) == 0) {
|
||||||
MwLLSetTitle(handle->lowlevel, value);
|
MwLLSetTitle(handle->lowlevel, value);
|
||||||
} else {
|
} else {
|
||||||
char* v = MwStringDuplicate(value);
|
char* v = value == NULL ? NULL : MwStringDuplicate(value);
|
||||||
|
|
||||||
if(shgeti(handle->text, key) != -1) free(shget(handle->text, key));
|
if(shgeti(handle->text, key) != -1) free(shget(handle->text, key));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user