[Coverity] Fix incorrect logic identified by deref-before-NULL-check

This commit is contained in:
baldurk
2018-05-08 12:47:28 +01:00
parent ada173ee26
commit 2efce90591
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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;