mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CA-84876: Corrected check for null object to fix NullReferenceException raised in tests
This commit is contained in:
parent
300648b396
commit
b122e1db1f
@ -993,9 +993,9 @@ namespace XenAPI
|
||||
os_name = os_name.Substring(0, index);
|
||||
|
||||
// CA-9631: conform to MS trademark guidelines
|
||||
if (os_name.StartsWith("MicrosoftŽ"))
|
||||
if (os_name.StartsWith("Microsoft®"))
|
||||
{
|
||||
if (os_name != "MicrosoftŽ")
|
||||
if (os_name != "Microsoft®")
|
||||
os_name = os_name.Substring(10).Trim();
|
||||
}
|
||||
else if (os_name.StartsWith("Microsoft"))
|
||||
@ -1099,7 +1099,7 @@ namespace XenAPI
|
||||
else if (this.is_a_snapshot)
|
||||
{
|
||||
var snapshotOf = this.Connection.Resolve(this.snapshot_of);
|
||||
if (snapshot_of == null)
|
||||
if (snapshotOf == null)
|
||||
return base.NameWithLocation;
|
||||
|
||||
return string.Format(Messages.SNAPSHOT_OF_TITLE, Name, snapshotOf.Name, LocationString);
|
||||
|
Loading…
Reference in New Issue
Block a user