mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Only add log viewer at the end of constructors, so the window is ready
* Otherwise if OnLogFileLoaded gets called while adding the log viewer the window might be partially constructed and crash.
This commit is contained in:
@@ -225,8 +225,6 @@ DebugMessageView::DebugMessageView(ICaptureContext &ctx, QWidget *parent)
|
||||
|
||||
ui->messages->setFont(Formatter::PreferredFont());
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
|
||||
m_ContextMenu = new QMenu(this);
|
||||
|
||||
m_ShowHidden = new QAction(tr("Show hidden rows"), this);
|
||||
@@ -252,6 +250,8 @@ DebugMessageView::DebugMessageView(ICaptureContext &ctx, QWidget *parent)
|
||||
&DebugMessageView::messages_toggled);
|
||||
|
||||
RefreshMessageList();
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
}
|
||||
|
||||
DebugMessageView::~DebugMessageView()
|
||||
|
||||
Reference in New Issue
Block a user