mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Add protection for buffer/texture viewer layouts failing to load.
This commit is contained in:
@@ -2539,7 +2539,15 @@ namespace renderdocui.Windows
|
||||
strm.Flush();
|
||||
strm.Position = 0;
|
||||
|
||||
dockPanel.LoadFromXml(strm, new DeserializeDockContent(GetContentFromPersistString));
|
||||
try
|
||||
{
|
||||
dockPanel.LoadFromXml(strm, new DeserializeDockContent(GetContentFromPersistString));
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// on error, go back to default layout
|
||||
UI_SetupDocks(MeshView);
|
||||
}
|
||||
}
|
||||
|
||||
onloadLayout = "";
|
||||
|
||||
@@ -613,7 +613,15 @@ namespace renderdocui.Windows
|
||||
strm.Flush();
|
||||
strm.Position = 0;
|
||||
|
||||
dockPanel.LoadFromXml(strm, new DeserializeDockContent(GetContentFromPersistString));
|
||||
try
|
||||
{
|
||||
dockPanel.LoadFromXml(strm, new DeserializeDockContent(GetContentFromPersistString));
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// on error, go back to default layout
|
||||
UI_SetupDocks();
|
||||
}
|
||||
}
|
||||
|
||||
onloadLayout = "";
|
||||
|
||||
Reference in New Issue
Block a user