Prevent segfault on shutdown
Oddly enough, putting the check in the Release function doesn't fix it. Makes me wonder how DirectSound did it. I don't know much C++.
This commit is contained in:
parent
cb4a9d40b9
commit
c27d15dddc
1 changed files with 2 additions and 1 deletions
|
@ -263,6 +263,7 @@ void EndDirectSound()
|
||||||
EndOrganya();
|
EndOrganya();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < SE_MAX; ++i)
|
for (unsigned int i = 0; i < SE_MAX; ++i)
|
||||||
|
if (lpSECONDARYBUFFER[i])
|
||||||
lpSECONDARYBUFFER[i]->Release();
|
lpSECONDARYBUFFER[i]->Release();
|
||||||
|
|
||||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
|
|
Loading…
Add table
Reference in a new issue