Avoid initializing a VLA of 0 length
authorMikael Magnusson <mikachu@gmail.com>
Mon, 17 Feb 2014 16:55:16 +0000 (17:55 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Thu, 10 Apr 2014 20:29:01 +0000 (22:29 +0200)
openbox/place.c

index 19bd924..91f87dc 100644 (file)
@@ -444,7 +444,7 @@ static gboolean place_least_overlap(ObClient *c, Rect *head, int *x, int *y,
         }
     }
 
         }
     }
 
-    {
+    if (n_client_rects) {
         Rect client_rects[n_client_rects];
         GSList* it;
         Point result;
         Rect client_rects[n_client_rects];
         GSList* it;
         Point result;