Skip to content

Commit

Permalink
#21 Fixed null ref on exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
djdd87 committed Dec 16, 2021
1 parent 3dbec46 commit 4780e25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Build an image to upload
* Ctrl+Shift+P
* Enter Docker Build
* Enter the name of the image
* Push the image via docker desktop

# Build the docker image
* Navigate into SynoAI (cd SynoAI)
* docker build -t synoai:0.1 .
Expand Down
2 changes: 1 addition & 1 deletion SynoAI/Controllers/CameraController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public async void Get(string id)

// Get any predictions that fall within the exclusion zones
List<Tuple<AIPrediction, Zone>> exclusionZonePredictions = new List<Tuple<AIPrediction, Zone>>();
if (camera.Exclusions.Count() > 0)
if (camera.Exclusions != null && camera.Exclusions.Count() > 0)
{
for (int i = 0; i < validPredictions.Count; i++)
{
Expand Down

0 comments on commit 4780e25

Please sign in to comment.