Skip to content

Commit

Permalink
Fix memory leak in CResourceManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Feb 13, 2018
1 parent 1365db7 commit c9f8da2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
FS.update_path(cname, "$game_shaders$", cname);

// duplicate and zero-terminate
IReader* R = FS.r_open(cname);
IReader* file = FS.r_open(cname);
// TODO: DX10: HACK: Implement all shaders. Remove this for PS
if (!R)
if (!file)
{
string1024 tmp;
// TODO: HACK: Test failure
Expand All @@ -391,9 +391,8 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
Msg(tmp);
strconcat(sizeof(cname), cname, GEnv.Render->getShaderPath(), "stub_default", ".gs");
FS.update_path(cname, "$game_shaders$", cname);
R = FS.r_open(cname);
file = FS.r_open(cname);
}
IReader* file = FS.r_open(cname);
R_ASSERT2(file, cname);

// Select target
Expand Down

0 comments on commit c9f8da2

Please sign in to comment.