diff --git a/core/avisynth_wrap.cpp b/core/avisynth_wrap.cpp index 4a8f1dde0..d5ebe1f8b 100644 --- a/core/avisynth_wrap.cpp +++ b/core/avisynth_wrap.cpp @@ -49,7 +49,7 @@ wxMutex AviSynthWrapper::AviSynthMutex; //////////////////////// // AviSynth constructor AviSynthWrapper::AviSynthWrapper() { - if (!avs_refcount++) { + if (!avs_refcount) { hLib=LoadLibrary(_T("avisynth.dll")); if (hLib == NULL) @@ -74,6 +74,7 @@ AviSynthWrapper::AviSynthWrapper() { if (memoryMax != 0) env->SetMemoryMax(memoryMax); + avs_refcount++; } }