projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb3e654
)
malloc. yeah.
author
Derek Foreman
<manmower@gmail.com>
Sun, 16 Mar 2003 23:49:05 +0000
(23:49 +0000)
committer
Derek Foreman
<manmower@gmail.com>
Sun, 16 Mar 2003 23:49:05 +0000
(23:49 +0000)
render/render.c
patch
|
blob
|
history
diff --git
a/render/render.c
b/render/render.c
index
71e5f7b
..
560ee38
100644
(file)
--- a/
render/render.c
+++ b/
render/render.c
@@
-177,7
+177,10
@@
Appearance *appearance_copy(Appearance *orig)
break;
}
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->xftdraw = NULL;
return copy;