Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Graphics/GraphicsTools/interface/RenderStateCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ class RenderDeviceWithCache : public RenderDeviceX<ThrowOnError>
if (pCacheData)
{
FileWrapper CacheDataFile{FilePath, EFileAccessMode::Overwrite};
if (CacheDataFile->Write(pCacheData->GetConstDataPtr(), pCacheData->GetSize()))
if (CacheDataFile && CacheDataFile->Write(pCacheData->GetConstDataPtr(), pCacheData->GetSize()))
LOG_INFO_MESSAGE("Successfully saved state cache file ", FilePath, " (", FormatMemorySize(pCacheData->GetSize()), ").");
else
LOG_ERROR_MESSAGE("Failed to save state cache file ", FilePath, " (", FormatMemorySize(pCacheData->GetSize()), ").");
}
}
else
Expand Down
Loading