diff options
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r-- | gtk2_ardour/editor_summary.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index a9cc524b15..5f3791ba47 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -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; |