summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/game.cpp2
-rw-r--r--src/main.cpp6
3 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a2004a75..25de29df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2007-07-22 Eugenio Favalli <elvenprogrammer@gmail.com>
+2007-07-23 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/main.cpp, src/game.cpp: Fixed segfault on exit when OpenGL
+ configuration changed.
+
+2007-07-22 Eugenio Favalli <elvenprogrammer@gmail.com>
* data/maps/new_1-1.tar.gz: Fixed insecure filenames.
diff --git a/src/game.cpp b/src/game.cpp
index 1afc530b..7385549b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -294,6 +294,8 @@ Game::~Game()
delete joystick;
delete particleEngine;
+ viewport->setMap(NULL);
+ player_node = NULL;
beingManager = NULL;
floorItemManager = NULL;
joystick = NULL;
diff --git a/src/main.cpp b/src/main.cpp
index 79ba49b4..8b631d56 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -992,12 +992,6 @@ int main(int argc, char *argv[])
{
state = STATE_EXIT;
}
- else if (state != STATE_FORCE_QUIT)
- {
- //TODO: solve this problem
- delete gui; // Crashes otherwise
- gui = new Gui(graphics);
- }
break;
case STATE_SWITCH_CHARACTER: