Fix crash on close on Linux.
[dcpomatic.git] / src / wx / gl_video_view.cc
index 5d40050de59fe9aaee717f8dda74df6482fc7724..a1379741582e6513397bbd2b0159f72a5fc3bd10 100644 (file)
@@ -161,7 +161,9 @@ GLVideoView::draw (Position<int> inter_position, dcp::Size inter_size)
        wxSize canvas_size;
        {
                boost::mutex::scoped_lock lm (_canvas_mutex);
-               canvas_size = _canvas->GetSize ();
+               if (_canvas) {
+                       canvas_size = _canvas->GetSize ();
+               }
        }
 
        if (canvas_size.GetWidth() < 64 || canvas_size.GetHeight() < 0) {