If some monitor exists in config.xml, but is not connected to the computer when the app launches, the program's control flow will reach MainViewModel.cs#L232, where the program tries to set newMonitorData.HdrLuts = new ObservableCollection<string>(hdrLutPaths).
However, since <hdr_luts /> may not be present in config.xml, hdrLutPaths may be null. This will result in a System.ArgumentNullException being thrown during construction of the ObservableCollection<string>.
This patch fixes the crash by only setting newMonitorData.HdrLuts when the corresponding hdrLutPaths is not null.
If some monitor exists in
config.xml
, but is not connected to the computer when the app launches, the program's control flow will reach MainViewModel.cs#L232, where the program tries to setnewMonitorData.HdrLuts = new ObservableCollection<string>(hdrLutPaths)
.However, since
<hdr_luts />
may not be present inconfig.xml
,hdrLutPaths
may benull
. This will result in aSystem.ArgumentNullException
being thrown during construction of theObservableCollection<string>
.This patch fixes the crash by only setting
newMonitorData.HdrLuts
when the correspondinghdrLutPaths
is notnull
.