[openjk] 112/130: SP: Fix crash when game API version doesn't match
Simon McVittie
smcv at debian.org
Fri Oct 28 11:09:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository openjk.
commit c80a08ba4ff0694a93d1dff3fd3c7bb9ceeaff7e
Author: Xycaleth <alex at acslo.com>
Date: Sat Aug 27 19:53:50 2016 +0100
SP: Fix crash when game API version doesn't match
Can't access 'ge' fields once the DLL has unloaded since it points to
memory owned by the DLL (which has now been unloaded).
---
code/server/sv_game.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/server/sv_game.cpp b/code/server/sv_game.cpp
index b78146c..8cd596f 100644
--- a/code/server/sv_game.cpp
+++ b/code/server/sv_game.cpp
@@ -1068,8 +1068,9 @@ void SV_InitGameProgs (void) {
if (ge->apiversion != GAME_API_VERSION)
{
+ int apiVersion = ge->apiversion;
Sys_UnloadDll( gameLibrary );
- Com_Error (ERR_DROP, "game is version %i, not %i", ge->apiversion, GAME_API_VERSION);
+ Com_Error (ERR_DROP, "game is version %i, not %i", apiVersion, GAME_API_VERSION);
}
//hook up the client while we're here
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git
More information about the Pkg-games-commits
mailing list