mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 09:26:52 +00:00
Fix crash if texture tabs were open when restoring state.
This commit is contained in:
@@ -1649,6 +1649,9 @@ void TextureViewer::textureTab_Changed(int index)
|
||||
{
|
||||
ToolWindowManagerArea *textureTabs = ui->dockarea->areaOf(ui->renderContainer);
|
||||
|
||||
if(!textureTabs)
|
||||
return;
|
||||
|
||||
QWidget *w = textureTabs->widget(index);
|
||||
|
||||
if(w)
|
||||
@@ -2804,6 +2807,12 @@ void TextureViewer::setPersistData(const QVariant &persistData)
|
||||
m_TexDisplay.backgroundColor =
|
||||
checker ? FloatVector() : FloatVector(backCol.redF(), backCol.greenF(), backCol.blueF(), 1.0f);
|
||||
|
||||
ToolWindowManagerArea *textureTabs = ui->dockarea->areaOf(ui->renderContainer);
|
||||
while(textureTabs->count() > 1)
|
||||
textureTabs->removeTab(1);
|
||||
|
||||
m_LockedTabs.clear();
|
||||
|
||||
updateBackgroundColors();
|
||||
|
||||
ui->dockarea->restoreState(state);
|
||||
|
||||
Reference in New Issue
Block a user