13
0

Fixes for crashes on session going away.

git-svn-id: svn://localhost/ardour2/branches/3.0@5317 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-07-04 11:51:25 +00:00
parent 30eafbef5e
commit 12bf437c6e
2 changed files with 10 additions and 4 deletions

View File

@ -45,4 +45,6 @@ EditorComponent::session_going_away ()
for (list<connection>::iterator i = _session_connections.begin(); i != _session_connections.end(); ++i) {
i->disconnect ();
}
_session = 0;
}

View File

@ -73,6 +73,10 @@ EditorSummary::on_expose_event (GdkEventExpose* event)
{
CairoWidget::on_expose_event (event);
if (_session == 0) {
return false;
}
cairo_t* cr = gdk_cairo_create (get_window()->gobj());
/* Render the view rectangle */
@ -115,16 +119,16 @@ EditorSummary::on_expose_event (GdkEventExpose* event)
void
EditorSummary::render (cairo_t* cr)
{
if (_session == 0) {
return;
}
/* background */
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0, 0, _width, _height);
cairo_fill (cr);
if (_session == 0) {
return;
}
/* compute total height of all tracks */
int h = 0;