fix crash when cleaning up canvas items

Backport from Mixbus. In Ardour this does not currently matter
since there is no top-level canvas destroyed top-down.

...
Editor::session_going_away
MixerStrip::~MixerStrip
MixbusStripCanvas::~MixbusStripCanvas
ArdourCanvas::GtkCanvas::~GtkCanvas
ArdourCanvas::Canvas::~Canvas
ArdourCanvas::Root::~Root
ArdourCanvas::Container::~Container
ArdourCanvas::Item::~Item
ArdourCanvas::Item::clear_items
GtkCanvas::item_going_away()
queue_draw_item_area()

..expose can take place async to garbage collection: crash in one of the
items.
This commit is contained in:
Robin Gareus 2015-11-02 05:15:55 +01:00
parent 84d44eb5a3
commit 160b24b137
2 changed files with 12 additions and 0 deletions

View file

@ -172,6 +172,7 @@ class LIBCANVAS_API GtkCanvas : public Canvas, public Gtk::EventBox
{
public:
GtkCanvas ();
~GtkCanvas () { _in_dtor = true ; }
void request_redraw (Rect const &);
void request_size (Duple);
@ -238,6 +239,8 @@ private:
bool show_tooltip ();
void hide_tooltip ();
bool really_start_tooltip_timeout ();
bool _in_dtor;
};
/** A GTK::Alignment with a GtkCanvas inside it plus some Gtk::Adjustments for