Add protection for buffer/texture viewer layouts failing to load.

This commit is contained in:
baldurk
2016-08-01 22:28:57 +02:00
parent 5508f9f599
commit e8cb71a895
2 changed files with 18 additions and 2 deletions
+9 -1
View File
@@ -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 = "";
+9 -1
View File
@@ -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 = "";