From 7559cf81b07509420f1ab85ed95f42f441888df7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 May 2013 14:39:31 +0000 Subject: Fix access to invalid parameter in Canvas::zoom_full(). git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5118 a436a847-0d15-0410-975c-d299462d15a1 --- src/Canvas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 71307bd..11fc50e 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -1875,12 +1875,12 @@ ganv_canvas_zoom_full(GanvCanvas* canvas) bottom = MIN(bottom, y - r); top = MAX(top, y + r); } else { - double x = 0.0, y = 0.0, w = 0.0, h = 0.0; - g_object_get(obj, "x", &x, "y", &y, "w", &w, "h", &h, NULL); + double x = 0.0, y = 0.0; + g_object_get(obj, "x", &x, "y", &y, NULL); left = MIN(left, x); - right = MAX(right, x + w); + right = MAX(right, x + ganv_box_get_width(GANV_BOX(*i))); bottom = MIN(bottom, y); - top = MAX(top, y + h); + top = MAX(top, y + ganv_box_get_height(GANV_BOX(*i))); } } -- cgit v1.2.1