diff options
author | David Robillard <d@drobilla.net> | 2014-12-06 17:46:12 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-06 22:43:06 -0500 |
commit | 09bd88c9df88a070a2cd98a223668c23333142a1 (patch) | |
tree | c94f490dc27ddb24f2275725d2bf21d6f126d78a | |
parent | 6f7ee67c713c7c7b90e59dd9b4027f348415adea (diff) |
Fix crash when resizing a track quickly.
Triggered by resize drag an automation track very quickly upwards to shrink it
to the minimum. Caused by unsigned integer underflow.
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 58969a97f5..9cba0bbac3 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -406,9 +406,9 @@ TimeAxisView::controls_ebox_button_press (GdkEventButton* event) } void -TimeAxisView::idle_resize (uint32_t h) +TimeAxisView::idle_resize (int32_t h) { - set_height (h); + set_height (std::max(0, h)); } diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 6dc02110c2..ab990f875a 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -124,7 +124,7 @@ class TimeAxisView : public virtual AxisView uint32_t current_height() const { return height; } - void idle_resize (uint32_t); + void idle_resize (int32_t); virtual guint32 show_at (double y, int& nth, Gtk::VBox *parent); virtual void hide (); |