projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecfb2b9
)
compositor: Attach only valid background buffers
author
Benjamin Franzke
<benjaminfranzke@googlemail.com>
Sat, 15 Jan 2011 11:34:49 +0000
(12:34 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 17 Jan 2011 02:09:22 +0000
(21:09 -0500)
If a background is not found,
create_buffer_from_png will return NULL.
Do not attach these buffers.
compositor/compositor.c
patch
|
blob
|
history
diff --git
a/compositor/compositor.c
b/compositor/compositor.c
index
7261dc2
..
cd13e4d
100644
(file)
--- a/
compositor/compositor.c
+++ b/
compositor/compositor.c
@@
-309,6
+309,10
@@
background_create(struct wlsc_output *output, const char *filename)
buffer = create_buffer_from_png(output->compositor,
filename,
output->width, output->height);
+ if (buffer == NULL) {
+ free(background);
+ return NULL;
+ }
buffer->attach(buffer, &background->surface);
return background;