summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/timeline.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index d2443c8a9..0d7ae7afb 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -151,6 +151,11 @@ Timeline::paint_labels ()
{
wxPaintDC dc (_labels_canvas);
+ auto film = _film.lock();
+ if (film->content().empty()) {
+ return;
+ }
+
auto gc = wxGraphicsContext::Create (dc);
if (!gc) {
return;
@@ -170,6 +175,12 @@ void
Timeline::paint_main ()
{
wxPaintDC dc (_main_canvas);
+
+ auto film = _film.lock();
+ if (film->content().empty()) {
+ return;
+ }
+
_main_canvas->DoPrepareDC (dc);
auto gc = wxGraphicsContext::Create (dc);