summaryrefslogtreecommitdiff
path: root/imagelist-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'imagelist-item.c')
-rw-r--r--imagelist-item.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/imagelist-item.c b/imagelist-item.c
index 4201c4a..04b1b78 100644
--- a/imagelist-item.c
+++ b/imagelist-item.c
@@ -32,8 +32,11 @@ void cImageListItem::Edit(const char *lname, const char *sname, eFileInfo type,
LName = lname ? strdup(lname) : NULL;
SName = sname ? strdup(sname) : NULL;
- if(type == tFile && value && value[0] != '.')
- asprintf(&Value, ".%s", value);
+ if(type == tFile && value && value[0] != '.') {
+ if(0 >= asprintf(&Value, ".%s", value)) {
+ return;
+ }
+ }
else
Value = value ? strdup(value) : NULL;