projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
762e5c2
)
compositor crashes if window width or height is <= 0
author
Tim Wiederhake
<twied@gmx.net>
Mon, 17 Jan 2011 11:40:01 +0000
(12:40 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Sun, 23 Jan 2011 18:58:18 +0000
(13:58 -0500)
clients/window.c
patch
|
blob
|
history
diff --git
a/clients/window.c
b/clients/window.c
index
017c324
..
5f78f33
100644
(file)
--- a/
clients/window.c
+++ b/
clients/window.c
@@
-1087,6
+1087,12
@@
handle_configure(void *data, struct wl_shell *shell,
struct window *window = wl_surface_get_user_data(surface);
int32_t child_width, child_height;
+ /* FIXME this is probably the wrong place to check for width or
+ height <= 0, but it prevents the compositor from crashing
+ */
+ if(width <= 0 || height <= 0)
+ return;
+
if (window->resize_handler) {
child_width = width - 20 - window->margin * 2;
child_height = height - 60 - window->margin * 2;