avisynth: Properly destruct the IScriptEnvironment

Starting with AVISYNTH_INTERFACE_VERSION=5, this is how script
environments should be deleted. The previous code was causing crashes
when unloading AviSynth in certain scenarios, such as when failing to
open a file due to an incorrect path.
This commit is contained in:
arch1t3cht 2022-08-13 22:53:58 +02:00
parent ce1b3a0158
commit ad443dd118
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ AviSynthWrapper::AviSynthWrapper() {
AviSynthWrapper::~AviSynthWrapper() {
if (!--avs_refcount) {
delete env;
env->DeleteScriptEnvironment();
#ifdef _WIN32
FreeLibrary(hLib);
#else