remove asset while preview active segv fix, guard against segv with missing asset...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / awindowgui.C
index b370b2c3f542ac048996b144e6dbd890cc854410..45954b76ca596053cc8a886aa714d56b708d2418 100644 (file)
@@ -547,10 +547,22 @@ AssetVIconThread::AssetVIconThread(AWindowGUI *gui, Preferences *preferences)
        case VICON_COLOR_MODE_HIGH:  vicon_cmodel = BC_RGB888;  break;
        }
        this->vicon_cmodel = vicon_cmodel;
+       this->draw_lock = new Mutex("AssetVIconThread::draw_lock");
 }
 
 AssetVIconThread::~AssetVIconThread()
 {
+       delete draw_lock;
+}
+
+void AssetVIconThread::drawing_started()
+{
+       draw_lock->lock("AssetVIconThread::drawing_started");
+}
+
+void AssetVIconThread::drawing_stopped()
+{
+       draw_lock->unlock();
 }
 
 void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode)