Skip to content

Commit 811ec2a

Browse files
committed
Do not crash in OpenCapture if m_RDC is NULL
The NULL case was being handled for setting the return code and then Error() was being called on a NULL m_RDC
1 parent 9ef756d commit 811ec2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

renderdoc/replay/capture_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ rdcpair<ResultDetails, IReplayController *> CaptureFile::OpenCapture(const Repla
355355
ReplayController *render = NULL;
356356

357357
if(!m_RDC)
358-
ret = RDResult(ResultCode::InternalError, "RDC file unexpectedly NULL");
358+
return {RDResult(ResultCode::InternalError, "RDC file unexpectedly NULL"), render};
359359

360360
ret = m_RDC->Error();
361361

0 commit comments

Comments
 (0)