mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 17:59:08 +02:00
Fix crashes / bad errors when loading a file fails.
This commit is contained in:
1 parent
3601723860
commit
3cd391c3e2
3 files changed
+9
-5
No files matched your search
@@ -14,8 +14,8 @@ namespace DSound
|
||||
|
||||
StreamCallback callback;
|
||||
|
||||
IDirectSound8 *ds;
|
||||
IDirectSoundBuffer *dsBuffer;
|
||||
IDirectSound8 *ds = NULL;
|
||||
IDirectSoundBuffer *dsBuffer = NULL;
|
||||
|
||||
int bufferSize; // bytes
|
||||
int totalRenderedBytes;
|
||||
@@ -196,8 +196,10 @@ namespace DSound
|
||||
/*
|
||||
while (threadData!=2)
|
||||
;*/
|
||||
dsBuffer->Release();
|
||||
ds->Release();
|
||||
if (dsBuffer != NULL)
|
||||
dsBuffer->Release();
|
||||
if (ds != NULL)
|
||||
ds->Release();
|
||||
|
||||
CloseHandle(soundSyncEvent);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user