X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fgl_video_view.cc;h=0f0118e00fde0699007c82431255006216a5d82a;hb=24524e414e850106861dc2b288131d904e0dc04f;hp=d1e7c7326e3d43a90554f28eb61163639e17ee29;hpb=fc4f75abd3b062e8297990a482e77e32458cd169;p=dcpomatic.git diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index d1e7c7326..0f0118e00 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -35,6 +35,7 @@ using std::cout; using boost::shared_ptr; +using boost::optional; GLVideoView::GLVideoView (wxWindow *parent) { @@ -117,6 +118,11 @@ GLVideoView::paint (wxPaintEvent &) void GLVideoView::set_image (shared_ptr image) { + if (!image) { + _size = optional(); + return; + } + DCPOMATIC_ASSERT (image->pixel_format() == AV_PIX_FMT_RGB24); DCPOMATIC_ASSERT (!image->aligned());