mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
[Coverity] Fix incorrect logic identified by deref-before-NULL-check
This commit is contained in:
@@ -969,7 +969,7 @@ void CaptureContext::ExportCapture(const CaptureFileFormat &fmt, const rdcstr &e
|
||||
if(status != ReplayStatus::Succeeded)
|
||||
{
|
||||
QString text = tr("Couldn't open file '%1' for export\n").arg(filename);
|
||||
QString message = local->ErrorString();
|
||||
QString message = file->ErrorString();
|
||||
if(message.isEmpty())
|
||||
text += tr("%1").arg(ToQStr(status));
|
||||
else
|
||||
|
||||
@@ -87,7 +87,7 @@ void DoSerialiseViaResourceId(SerialiserType &ser, type &el)
|
||||
|
||||
DoSerialise(ser, id);
|
||||
|
||||
if(ser.IsReading() && !IsStructuredExporting(rm->GetState()))
|
||||
if(ser.IsReading() && rm && !IsStructuredExporting(rm->GetState()))
|
||||
{
|
||||
el = VK_NULL_HANDLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user