Fix crash on close on Linux. v2.15.121
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Jan 2021 02:09:11 +0000 (03:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Jan 2021 02:09:11 +0000 (03:09 +0100)
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) {