fix bug #71 - was a double-free (both ~CRenderer and UnloadResources were calling UnloadWaterTextures)
This was SVN commit r3071.
This commit is contained in:
parent
6af5888866
commit
74bf76d523
@ -306,6 +306,7 @@ void CGameView::UnloadResources()
|
||||
// g_ObjMan.UnloadObjects();
|
||||
|
||||
g_Renderer.UnloadAlphaMaps();
|
||||
g_Renderer.UnloadWaterTextures();
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ class CGameView: public CJSObject<CGameView>
|
||||
|
||||
// InitResources(): Load all graphics resources (textures, actor objects and
|
||||
// alpha maps) required by the game
|
||||
void InitResources();
|
||||
//void InitResources();
|
||||
|
||||
// UnloadResources(): Unload all graphics resources loaded by InitResources
|
||||
void UnloadResources();
|
||||
|
@ -747,7 +747,7 @@ static int h_free_idx(i32 idx, HDATA* hd)
|
||||
|
||||
fn_free(hd);
|
||||
|
||||
memset(hd, 0, sizeof(HDATA));
|
||||
memset(hd, 0, sizeof(*hd));
|
||||
|
||||
free_idx(idx);
|
||||
|
||||
|
@ -167,8 +167,9 @@ CRenderer::~CRenderer()
|
||||
delete m_VertexShader;
|
||||
m_VertexShader = 0;
|
||||
|
||||
UnloadAlphaMaps();
|
||||
UnloadWaterTextures();
|
||||
// we no longer UnloadAlphaMaps / UnloadWaterTextures here -
|
||||
// that is the responsibility of the module that asked for
|
||||
// them to be loaded (i.e. CGameView).
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user