summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-05-31 14:39:31 +0000
committerDavid Robillard <d@drobilla.net>2013-05-31 14:39:31 +0000
commit7559cf81b07509420f1ab85ed95f42f441888df7 (patch)
treeebe633235662c46b764ebeef98226561fae74aec /src
parent84523b228a901ec053f9a1e860c6c614309eef7f (diff)
downloadganv-7559cf81b07509420f1ab85ed95f42f441888df7.tar.gz
ganv-7559cf81b07509420f1ab85ed95f42f441888df7.tar.bz2
ganv-7559cf81b07509420f1ab85ed95f42f441888df7.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/Canvas.cpp8
1 files 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)));
}
}