Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Validate width/height aren't 0 for snapshot #11364

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public static class Options {
* @param height the height of the image
*/
public Options(int width, int height) {
if (width == 0 || height == 0) {
throw new IllegalArgumentException("Unable to create a snapshot with width or height set to 0");
}
this.width = width;
this.height = height;
}
Expand Down