X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.C;h=d726265030e57ffb1c13adf536c9f193f3a8553e;hp=1f80bc470c40799c84067557e1938ba769ff4591;hb=7cec2a82e63b4cbd8ce58fd98bd66eb4e7f2e826;hpb=47ad0dcdda5b5ae53931025c581eef1782fc5e12 diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index 1f80bc47..d7262650 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -43,6 +43,8 @@ add_image(VFrame *frm, int ww, int hh, int vcmdl) void VIcon:: draw_vframe(VIconThread *vt, BC_WindowBase *wdw, int x, int y) { + VFrame *vfrm = frame(); + if( !vfrm ) return; int sx0 = 0, sx1 = sx0 + vt->view_w; int sy0 = 0, sy1 = sy0 + vt->view_h; int dx0 = x, dx1 = dx0 + vw; @@ -54,7 +56,7 @@ draw_vframe(VIconThread *vt, BC_WindowBase *wdw, int x, int y) int sw = sx1 - sx0, sh = sy1 - sy0; int dw = dx1 - dx0, dh = dy1 - dy0; if( dw > 0 && dh > 0 && sw > 0 && sh > 0 ) - wdw->draw_vframe(frame(), dx0,dy0, dw,dh, sx0,sy0, sw,sh); + wdw->draw_vframe(vfrm, dx0,dy0, dw,dh, sx0,sy0, sw,sh); } void VIconThread:: @@ -184,6 +186,7 @@ ViewPopup::~ViewPopup() void ViewPopup::draw_vframe(VFrame *frame) { + if( !frame ) return; BC_WindowBase::draw_vframe(frame, 0,0, get_w(),get_h()); }