mirror of https://github.com/odrling/Aegisub
Increment avisynth refcount after successful creation
Originally committed to SVN as r22.
This commit is contained in:
parent
e5043bb738
commit
16729ec5ea
|
@ -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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue