Skip to content

Commit

Permalink
fix out of bounds index when no cameras are connected to the computer
Browse files Browse the repository at this point in the history
  • Loading branch information
cwiede committed Jan 4, 2023
1 parent 8a598ec commit 59b3440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nexxT/tests/src/CameraGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ CameraGrabber::CameraGrabber(BaseFilterEnvironment *env)
{
devices.push_back(cameraDevice.description());
}
if(devices.size() == 0)
{
devices.push_back("dummy");
}
pc->defineProperty("device", devices[0], "the camera device", {{"enum", devices}});
}

Expand Down

0 comments on commit 59b3440

Please sign in to comment.