From 4c016dfbdfc1720455c46027a4dbd443537ab9aa Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 28 May 2012 16:51:56 +0000 Subject: [PATCH] - attempt to fix segfault from menu handling after playing a few games --- source/glest_game/graphics/renderer.cpp | 9 +++++---- source/glest_game/graphics/renderer.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index a42b79b4..c4a7c6b8 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -190,7 +190,7 @@ Renderer::Renderer() : BaseRenderer() { //list3dMenu=0; //list3dMenuValid=false; //customlist3dMenu=NULL; - this->mm3d = NULL; + //this->mm3d = NULL; this->custom_mm3d = NULL; this->program = NULL; @@ -527,7 +527,7 @@ void Renderer::initMenu(const MainMenu *mm) { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - init3dListMenu(mm); + //init3dListMenu(mm); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); } @@ -562,7 +562,8 @@ void Renderer::reset3dMenu() { //glCallList(*this->customlist3dMenu); } else { - render3dMenuSetup(this->mm3d); + render3dMenuSetup(this->menu); + //render3dMenuSetup(this->mm3d); //glCallList(list3dMenu); } @@ -7150,7 +7151,7 @@ void Renderer::init3dListMenu(const MainMenu *mm) { return; } - this->mm3d = mm; + //this->mm3d = mm; //printf("In [%s::%s Line: %d] this->custom_mm3d [%p] this->mm3d [%p]\n",__FILE__,__FUNCTION__,__LINE__,this->custom_mm3d,this->mm3d); /* diff --git a/source/glest_game/graphics/renderer.h b/source/glest_game/graphics/renderer.h index b50162dd..6c7ca683 100644 --- a/source/glest_game/graphics/renderer.h +++ b/source/glest_game/graphics/renderer.h @@ -282,7 +282,7 @@ private: //GLuint list3dMenu; //bool list3dMenuValid; //GLuint *customlist3dMenu; - const MainMenu *mm3d; + //const MainMenu *mm3d; const MainMenu *custom_mm3d; //shadows