malloc. yeah.

This commit is contained in:
Derek Foreman 2003-03-16 23:49:05 +00:00
parent bb3e654ede
commit f8ad321e50

View file

@ -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;