Make Cue notes property null-safe

This commit is contained in:
2020-09-10 12:26:19 -05:00
parent 9b46f64aa0
commit 868af589f8
6 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Zeroconf" Version="3.4.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
+4 -2
View File
@@ -239,7 +239,10 @@ namespace QControlKit
{
get
{
return propertyForKey(QOSCKey.Notes).ToString();
if (propertyForKey(QOSCKey.Notes) != null)
return propertyForKey(QOSCKey.Notes).ToString();
else
return "";
}
set
{
@@ -568,7 +571,6 @@ namespace QControlKit
if (!cueUpdated)
return false;
OnCuePropertiesUpdated(propertiesUpdated);
return true;
}
+1 -1
View File
@@ -342,7 +342,7 @@ namespace QControlKit
string[] keys = new string[] { QOSCKey.Name, QOSCKey.Number, QOSCKey.FileTarget, QOSCKey.CueTargetNumber,
QOSCKey.HasFileTargets, QOSCKey.HasCueTargets, QOSCKey.Armed, QOSCKey.ColorName,
QOSCKey.ContinueMode, QOSCKey.Flagged, QOSCKey.PreWait, QOSCKey.PostWait,
QOSCKey.Duration, QOSCKey.AllowsEditingDuration };
QOSCKey.Duration, QOSCKey.AllowsEditingDuration, QOSCKey.Notes };
fetchPropertiesForCue(cue, keys, false);
}