repair vaapi encode_frame, fix segv on unreadable asset, update crop resource icon...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / awindowgui.C
index 0caedce4747cdfceaa72ad26e3f403f7626e4e3c..66e69c3bd873d769092624af39d32cfb95b377d1 100644 (file)
@@ -121,8 +121,7 @@ VFrame *AssetVIcon::frame()
 {
        AssetVIconThread *avt = picon->gui->vicon_thread;
        Asset *asset = (Asset *)picon->indexable;
-       if( !asset )
-               return *images[0];
+       if( !asset ) return vframes()>0 ? (VFrame*)*images[0] : 0;
        if( !asset->video_data && audio_data && audio_size && length > 0 ) {
                if( !temp ) temp = new VFrame(0, -1, w, h, BC_RGB888, -1);
                temp->clear_frame();
@@ -2839,7 +2838,8 @@ int AWindowAssets::selection_changed()
                        case AW_CLIP_FOLDER:
                                if( get_buttonpress() == LEFT_BUTTON ) {
                                        AssetVIcon *vicon = 0;
-                                       if( !gui->vicon_thread->vicon )
+                                       AssetVIconThread *avt = gui->vicon_thread;
+                                       if( !avt->vicon && gui->vicon_drawing != AVICON_NO_PLAY )
                                                vicon = item->vicon;
                                        gui->vicon_thread->set_view_popup(vicon, ASSET_VIEW_ICON);
                                }