Increment avisynth refcount after successful creation

Originally committed to SVN as r22.
This commit is contained in:
Fredrik Mellbin 2006-01-24 23:01:30 +00:00
parent e5043bb738
commit 16729ec5ea
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,7 @@ wxMutex AviSynthWrapper::AviSynthMutex;
//////////////////////// ////////////////////////
// AviSynth constructor // AviSynth constructor
AviSynthWrapper::AviSynthWrapper() { AviSynthWrapper::AviSynthWrapper() {
if (!avs_refcount++) { if (!avs_refcount) {
hLib=LoadLibrary(_T("avisynth.dll")); hLib=LoadLibrary(_T("avisynth.dll"));
if (hLib == NULL) if (hLib == NULL)
@ -74,6 +74,7 @@ AviSynthWrapper::AviSynthWrapper() {
if (memoryMax != 0) if (memoryMax != 0)
env->SetMemoryMax(memoryMax); env->SetMemoryMax(memoryMax);
avs_refcount++;
} }
} }