Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-26 11:13:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-26 11:13:42 +0300
commit02a7063a0922c6c59a9f71ea2627e4f211a79899 (patch)
tree230ed5a6652bbd3ac16d4bb060d451301395c7fd /source
parentd53a0cd48f5e9293a9e08252d261c830c34f532c (diff)
fix for blenderplayer crashing on exit.
the event consumer was being freed twice, once when going out of C++ scope, another when freeing the system.
Diffstat (limited to 'source')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 65a68f1bac3..968d6caeb1c 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -939,6 +939,10 @@ int main(int argc, char** argv)
}
app.StopGameEngine();
+ /* 'app' is freed automatic when out of scope.
+ * removal is needed else the system will free an already freed value */
+ system->removeEventConsumer(&app);
+
BLO_blendfiledata_free(bfd);
}
} while (exitcode == KX_EXIT_REQUEST_RESTART_GAME || exitcode == KX_EXIT_REQUEST_START_OTHER_GAME);