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,7 +263,8 @@ void EndDirectSound()
|
|||
EndOrganya();
|
||||
|
||||
for (unsigned int i = 0; i < SE_MAX; ++i)
|
||||
lpSECONDARYBUFFER[i]->Release();
|
||||
if (lpSECONDARYBUFFER[i])
|
||||
lpSECONDARYBUFFER[i]->Release();
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue