Skip to content

Commit c9f8da2

Browse files
committed
Fix memory leak in CResourceManager.
1 parent 1365db7 commit c9f8da2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
380380
FS.update_path(cname, "$game_shaders$", cname);
381381

382382
// duplicate and zero-terminate
383-
IReader* R = FS.r_open(cname);
383+
IReader* file = FS.r_open(cname);
384384
// TODO: DX10: HACK: Implement all shaders. Remove this for PS
385-
if (!R)
385+
if (!file)
386386
{
387387
string1024 tmp;
388388
// TODO: HACK: Test failure
@@ -391,9 +391,8 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
391391
Msg(tmp);
392392
strconcat(sizeof(cname), cname, GEnv.Render->getShaderPath(), "stub_default", ".gs");
393393
FS.update_path(cname, "$game_shaders$", cname);
394-
R = FS.r_open(cname);
394+
file = FS.r_open(cname);
395395
}
396-
IReader* file = FS.r_open(cname);
397396
R_ASSERT2(file, cname);
398397

399398
// Select target

0 commit comments

Comments
 (0)