Skip to content

Commit 735edb8

Browse files
committed
Handle null evaluation results
1 parent 7612bce commit 735edb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/DXResourceBindingORT/DXResourceBindingORT.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ private async void ClassifyCube()
5454
break;
5555
}
5656
float[] results = await Task.Run(() => WinMLSamplesGalleryNative.DXResourceBinding.EvalORT());
57+
// The first evaluation may return null so move to the next iteration
58+
if (results == null)
59+
continue;
5760
UpdateClassificationResults(results);
5861
System.Threading.Thread.Sleep(1000);
5962
i++;

0 commit comments

Comments
 (0)