mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Don't pass NULL f to fclose, passing --no-clobber if file doesn't exist
This commit is contained in:
@@ -998,10 +998,14 @@ struct EmbeddedSectionCommand : public Command
|
||||
|
||||
if(noclobber)
|
||||
{
|
||||
bool exists = false;
|
||||
f = fopen(file.c_str(), "rb");
|
||||
bool exists = (f != NULL);
|
||||
fclose(f);
|
||||
f = NULL;
|
||||
if(f)
|
||||
{
|
||||
exists = true;
|
||||
fclose(f);
|
||||
f = NULL;
|
||||
}
|
||||
|
||||
if(exists)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user