mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +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:
@@ -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