From: <Pi...@us...> - 2010-11-07 00:38:46
|
Revision: 1607 http://cs-sdl.svn.sourceforge.net/cs-sdl/?rev=1607&view=rev Author: Pikablu Date: 2010-11-07 00:38:40 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Added check to Events.CloseMixer() to prevent a crash if the dll is missing Modified Paths: -------------- trunk/SdlDotNet/src/Core/Events.cs Modified: trunk/SdlDotNet/src/Core/Events.cs =================================================================== --- trunk/SdlDotNet/src/Core/Events.cs 2010-11-07 00:33:03 UTC (rev 1606) +++ trunk/SdlDotNet/src/Core/Events.cs 2010-11-07 00:38:40 UTC (rev 1607) @@ -498,16 +498,16 @@ /// </summary> public static void CloseMixer() { - try - { + try { SdlMixer.Mix_CloseAudio(); - if (Sdl.SDL_WasInit(Sdl.SDL_INIT_AUDIO) != 0) - { + if (Sdl.SDL_WasInit(Sdl.SDL_INIT_AUDIO) != 0) { Sdl.SDL_QuitSubSystem(Sdl.SDL_INIT_AUDIO); } - } - catch (AccessViolationException) + } catch (AccessViolationException) { } + // No DLL? No problem. + catch (DllNotFoundException) + { } } /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |