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:
@@ -490,8 +490,6 @@ TextureViewer::TextureViewer(ICaptureContext &ctx, QWidget *parent)
|
||||
ui->sliceFace->setFont(Formatter::PreferredFont());
|
||||
ui->zoomOption->setFont(Formatter::PreferredFont());
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
|
||||
Reset();
|
||||
|
||||
on_checkerBack_clicked();
|
||||
@@ -644,6 +642,8 @@ TextureViewer::TextureViewer(ICaptureContext &ctx, QWidget *parent)
|
||||
ui->zoomOption->setCurrentText(QString());
|
||||
ui->fitToWindow->toggle();
|
||||
|
||||
m_Ctx.AddLogViewer(this);
|
||||
|
||||
SetupTextureTabs();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user