Fix crash on enabling tape mode.
[ardour.git] / gtk2_ardour / control_point.cc
index 7632642adc32ce80be91e7ff1bf04116c48a86c9..801bd5bb82e073985a2c7e955d3482c77b50b1b4 100644 (file)
@@ -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);