|
@@ -970,9 +970,9 @@ namespace WingDeviceService.Service
|
|
|
OutputWidth = video.Width,
|
|
|
OutputHeight = video.Height,
|
|
|
};
|
|
|
- var oldVideo = deviceDTO.VideoDeviceInfos?.FirstOrDefault(x => x.VideoDeviceId == video.VideoDeviceId);
|
|
|
- if (oldVideo != null)
|
|
|
+ if (deviceDTO.VideoDeviceInfos != null && deviceDTO.VideoDeviceInfos.Any(x => x.VideoDeviceId == video.VideoDeviceId))
|
|
|
{
|
|
|
+ var oldVideo = deviceDTO.VideoDeviceInfos.FirstOrDefault(x => x.VideoDeviceId == video.VideoDeviceId);
|
|
|
videoDeviceInfo.OutputWidth = oldVideo.OutputWidth;
|
|
|
videoDeviceInfo.OutputHeight = oldVideo.OutputHeight;
|
|
|
}
|