Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crash bug in radar VBO code when saving/loading the game. Ooops. …

…Closes ticket:3954.
  • Loading branch information...
commit 7b7cb476bec9b414d8c1d52e40b17cdbecfbc940 1 parent fc77e4e
@perim perim authored
Showing with 3 additions and 5 deletions.
  1. +3 −0  src/init.cpp
  2. +0 −5 src/radar.cpp
View
3  src/init.cpp
@@ -36,6 +36,7 @@
#include "lib/ivis_opengl/piemode.h"
#include "lib/ivis_opengl/piestate.h"
#include "lib/ivis_opengl/screen.h"
+#include "lib/ivis_opengl/pieblitfunc.h"
#include "lib/ivis_opengl/tex.h"
#include "lib/ivis_opengl/ivi.h"
#include "lib/netplay/netplay.h"
@@ -545,6 +546,7 @@ bool systemInitialise(void)
// Fix badly named OpenGL functions. Must be done after iV_TextInit, to avoid the renames being clobbered by an extra glewInit() call.
screen_EnableMissingFunctions();
+ pie_InitRadar();
iV_Reset(); // Reset the IV library.
readAIs();
@@ -560,6 +562,7 @@ extern char *mod_list;
void systemShutdown(void)
{
+ pie_ShutdownRadar();
if (mod_list)
{
free(mod_list);
View
5 src/radar.cpp
@@ -150,8 +150,6 @@ bool InitRadar()
{
RadarZoom = pie_GetVideoBufferWidth() <= 640 ? 14 : DEFAULT_RADARZOOM * 2;
}
- pie_InitRadar();
-
return true;
}
@@ -185,11 +183,8 @@ bool resizeRadar()
bool ShutdownRadar()
{
- pie_ShutdownRadar();
-
free(radarBuffer);
radarBuffer = NULL;
-
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.