malloc. yeah.
This commit is contained in:
parent
bb3e654ede
commit
f8ad321e50
1 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,10 @@ Appearance *appearance_copy(Appearance *orig)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
copy->textures = orig->textures;
|
copy->textures = orig->textures;
|
||||||
memcpy(copy->texture, orig->texture, orig->textures * sizeof(Texture));
|
if (orig->textures) {
|
||||||
|
copy->texture = malloc(orig->textures * sizeof(Texture));
|
||||||
|
memcpy(copy->texture, orig->texture, orig->textures * sizeof(Texture));
|
||||||
|
} else copy->texture = NULL;
|
||||||
copy->pixmap = None;
|
copy->pixmap = None;
|
||||||
copy->xftdraw = NULL;
|
copy->xftdraw = NULL;
|
||||||
return copy;
|
return copy;
|
||||||
|
|
Loading…
Reference in a new issue