Permalink
Browse files

Fix error return code

  • Loading branch information...
1 parent 305d5ca commit cafb761d6790a7d3cfd03c29360f11e9e12c3c78 @kaoskorobase committed May 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 server/scsynth/SC_World.cpp
@@ -703,14 +703,16 @@ SC_DLLEXPORT_C void World_NonRealTimeSynthesis(struct World *world, WorldOptions
SC_DLLEXPORT_C int World_WaitForQuit(struct World *inWorld)
{
- int exitCode = 1;
+ int exitCode = 0;
try {
inWorld->hw->mQuitProgram->Acquire();
exitCode = inWorld->hw->mExitCode;
World_Cleanup(inWorld);
} catch (std::exception& exc) {
scprintf("Exception in World_WaitForQuit: %s\n", exc.what());
+ exitCode = 1;
} catch (...) {
+ exitCode = 1;
}
return exitCode;
}

0 comments on commit cafb761

Please sign in to comment.