From: Mikael Magnusson Date: Wed, 2 Aug 2006 16:36:29 +0000 (+0000) Subject: be paranoid about programs setting 0 resize increments, which results in a divide... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=05c0dbfedf0c525137eaa05c26c5d10c584ec0d5;p=chaz%2Fopenbox be paranoid about programs setting 0 resize increments, which results in a divide by zero, which is in turn bad --- diff --git a/openbox/client.c b/openbox/client.c index aa7812e6..11f2012f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1234,7 +1234,7 @@ void client_update_normal_hints(ObClient *self) if (size.flags & PBaseSize) SIZE_SET(self->base_size, size.base_width, size.base_height); - if (size.flags & PResizeInc) + if (size.flags & PResizeInc && size.width_inc && size_height_inc) SIZE_SET(self->size_inc, size.width_inc, size.height_inc); } }