From 16729ec5ea2263aed287d50aff67d63cb848dfba Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Tue, 24 Jan 2006 23:01:30 +0000 Subject: [PATCH] Increment avisynth refcount after successful creation Originally committed to SVN as r22. --- core/avisynth_wrap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; } }