mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 07:26:34 +00:00
Don't crash if the event browser isn't open when opening a capture
This commit is contained in:
@@ -1246,7 +1246,7 @@ void EventBrowser::ClearFindIcons(RDTreeWidgetItem *parent)
|
||||
|
||||
void EventBrowser::ClearFindIcons()
|
||||
{
|
||||
if(m_Ctx.IsCaptureLoaded())
|
||||
if(m_Ctx.IsCaptureLoaded() && ui->events->topLevelItemCount() > 0)
|
||||
ClearFindIcons(ui->events->topLevelItem(0));
|
||||
}
|
||||
|
||||
|
||||
@@ -2084,7 +2084,8 @@ void MainWindow::OnCaptureLoaded()
|
||||
|
||||
PopulateRecentCaptureFiles();
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetEventBrowser()->Widget());
|
||||
if(m_Ctx.HasEventBrowser())
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetEventBrowser()->Widget());
|
||||
}
|
||||
|
||||
void MainWindow::OnCaptureClosed()
|
||||
|
||||
Reference in New Issue
Block a user