summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2011-01-17 12:40:01 +0100
committerKristian Høgsberg <krh@bitplanet.net>2011-01-23 13:58:18 -0500
commit8a6f7e313966c4f6d71d1da5539c7b2506a91998 (patch)
treec43647b22e7fe1f9b74215c8ddfc787b04eb587e /clients
parent762e5c25d6be89f1cb6d6ffc93040ece6d08e537 (diff)
compositor crashes if window width or height is <= 0
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 017c324..5f78f33 100644
--- 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;