libzmpeg3 layer3 tweak, listbox selection fix, vicon emtpy video fixes
[goodguy/history.git] / cinelerra-5.1 / guicast / vicon.C
index 1f80bc470c40799c84067557e1938ba769ff4591..d726265030e57ffb1c13adf536c9f193f3a8553e 100644 (file)
@@ -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)
 {
 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;
        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 )
        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::
 }
 
 void VIconThread::
@@ -184,6 +186,7 @@ ViewPopup::~ViewPopup()
 
 void ViewPopup::draw_vframe(VFrame *frame)
 {
 
 void ViewPopup::draw_vframe(VFrame *frame)
 {
+       if( !frame ) return;
        BC_WindowBase::draw_vframe(frame, 0,0, get_w(),get_h());
 }
 
        BC_WindowBase::draw_vframe(frame, 0,0, get_w(),get_h());
 }