mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +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:
@@ -65,10 +65,6 @@ EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
OnLogfileClosed();
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
|
||||
clearBookmarks();
|
||||
|
||||
ui->jumpToEID->setFont(Formatter::PreferredFont());
|
||||
@@ -156,6 +152,10 @@ EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
|
||||
ui->events->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
QObject::connect(ui->events->header(), &QHeaderView::customContextMenuRequested, this,
|
||||
&EventBrowser::events_contextMenu);
|
||||
|
||||
OnLogfileClosed();
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
}
|
||||
|
||||
EventBrowser::~EventBrowser()
|
||||
|
||||
Reference in New Issue
Block a user