Skip to content

Commit

Permalink
Audio|Client: Handle audio plugin library load error
Browse files Browse the repository at this point in the history
Fixes #2134
  • Loading branch information
skyjake committed Nov 28, 2015
1 parent b70c42d commit 745ab8f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doomsday/apps/client/src/audio/audiodriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,18 @@ DENG2_PIMPL(AudioDriver)
{
DENG2_ASSERT(!initialized);

library = Library_New(libFile.path().toUtf8().constData());
zap(iBase);
zap(iSfx);
zap(iMusic);
zap(iCd);

if(!library) return;
library = Library_New(libFile.path().toUtf8().constData());
if(!library)
{
throw LoadError("AudioDriver::importInterfaces",
"Failed to load " + libFile.description());
}

de::Library &lib = libFile.library();

lib.setSymbolPtr( iBase.Init, "DS_Init");
Expand Down

0 comments on commit 745ab8f

Please sign in to comment.