mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 22:43:49 +00:00
Handle StaticExports.GetVersionString() being missing
* If the user is somehow running a really new UI with old DLL, handle the exception and continue to allow the user to update without crashing.
This commit is contained in:
1 parent
bb5f8c9bec
commit
1faf46ddc5
2 files changed
+23
-2
No files matched your search
@@ -62,7 +62,19 @@ namespace renderdocui.Windows.Dialogs
|
||||
|
||||
updateNotes.Select(0, 0);
|
||||
|
||||
updateMetadata.Text = "v" + StaticExports.GetVersionString() +
|
||||
string curver = "?.?";
|
||||
|
||||
try
|
||||
{
|
||||
curver = StaticExports.GetVersionString();
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// probably StaticExports.GetVersionString is missing, which means an old
|
||||
// version is running
|
||||
}
|
||||
|
||||
updateMetadata.Text = "v" + curver +
|
||||
Environment.NewLine + Environment.NewLine +
|
||||
String.Format("v{0}", response_split[0]) +
|
||||
Environment.NewLine + Environment.NewLine +
|
||||
|
||||
@@ -1284,7 +1284,16 @@ namespace renderdocui.Windows
|
||||
|
||||
private bool IsVersionMismatched()
|
||||
{
|
||||
return "v" + StaticExports.GetVersionString() != VersionString;
|
||||
try
|
||||
{
|
||||
return "v" + StaticExports.GetVersionString() != VersionString;
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// probably StaticExports.GetVersionString is missing, which means an old
|
||||
// version is running
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool HandleMismatchedVersions()
|
||||
|
||||
Reference in new issue
Block a user