PKGBUILD fix libva/vdpau deps
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / playbackengine.C
index b9845f3..b59e609 100644 (file)
@@ -130,7 +130,11 @@ int PlaybackEngine::create_render_engine()
 void PlaybackEngine::delete_render_engine()
 {
        renderengine_lock->lock("PlaybackEngine::delete_render_engine");
-       delete render_engine;  render_engine = 0;
+       if( render_engine ) {
+               render_engine->interrupt_playback();
+               render_engine->wait_done();
+               delete render_engine;  render_engine = 0;
+       }
        renderengine_lock->unlock();
 }