Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
fixed divided by zero crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CatxFish committed Oct 24, 2017
1 parent 7d2c61d commit 291b8df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/queue/share_queue_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ bool shared_queue_get_video_format(int* format, int* width,
else
success = false;

if (*height <= 0 || *width <= 0 || *avgtime <= 0)
success = false;

CloseHandle(hwnd);
return success;
}
Expand Down

0 comments on commit 291b8df

Please # to comment.