summaryrefslogtreecommitdiff
path: root/gtk2_ardour/control_point.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-20 17:31:21 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-20 17:31:21 +0000
commit6898dd04a61cb06bd2238128be27e1f0ab6d6e62 (patch)
tree6d05921e3528e929238518463d0e40c6d990c4ee /gtk2_ardour/control_point.cc
parent0cdf0433f75a2ecdcf6917466f97b74fccbefa71 (diff)
Fix crash on enabling tape mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@8911 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/control_point.cc')
-rw-r--r--gtk2_ardour/control_point.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc
index 7632642adc..801bd5bb82 100644
--- a/gtk2_ardour/control_point.cc
+++ b/gtk2_ardour/control_point.cc
@@ -118,6 +118,14 @@ ControlPoint::visible () const
void
ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t vi, ShapeType shape)
{
+ /* If this is too big, libart will confuse itself and segfault after it casts the bounding box
+ of this automation line to ints. Sigh.
+ */
+
+ if (x > INT32_MAX) {
+ x = INT32_MAX;
+ }
+
_model = mi;
_view_index = vi;
move_to (x, y, shape);