mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add some parameter checking to the capture context interface
This commit is contained in:
@@ -921,6 +921,11 @@ void CaptureContext::RaiseDockWindow(QWidget *dockWindow)
|
||||
void CaptureContext::AddDockWindow(QWidget *newWindow, DockReference ref, QWidget *refWindow,
|
||||
float percentage)
|
||||
{
|
||||
if(!newWindow)
|
||||
{
|
||||
qCritical() << "Unexpected NULL newWindow in AddDockWindow";
|
||||
return;
|
||||
}
|
||||
setupDockWindow(newWindow);
|
||||
|
||||
if(ref == DockReference::MainToolArea)
|
||||
@@ -933,6 +938,13 @@ void CaptureContext::AddDockWindow(QWidget *newWindow, DockReference ref, QWidge
|
||||
m_MainWindow->mainToolManager()->addToolWindow(newWindow, m_MainWindow->leftToolArea());
|
||||
return;
|
||||
}
|
||||
|
||||
if(!refWindow)
|
||||
{
|
||||
qCritical() << "Unexpected NULL refWindow in AddDockWindow";
|
||||
return;
|
||||
}
|
||||
|
||||
if(ref == DockReference::ConstantBufferArea)
|
||||
{
|
||||
if(ConstantBufferPreviewer::getOne())
|
||||
|
||||
Reference in New Issue
Block a user