smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
619 stars 156 forks source link

fix Win32 issue: disconnected monitors on would cause vector bounds exception #43

Closed BradyBrenot closed 6 years ago

BradyBrenot commented 6 years ago

I have three monitors, but monitors 0 and 2 are disconnected. This would cause a vector bounds exception in isMonitorInsideBounds:

auto &realmonitor = monitors[Index(monitor)];

as monitors.size() == 1 but Index(monitor) == 1

smasherprog commented 6 years ago

Good catch!