From 0986b30c8296cd6275e406c6883d88833d2e1bc1 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sun, 6 Aug 2017 18:36:14 +0200 Subject: MacGui: sanitise modulus values. --- macosx/HBPicture.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'macosx') diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m index 5578245e4..74c582509 100644 --- a/macosx/HBPicture.m +++ b/macosx/HBPicture.m @@ -725,6 +725,11 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; self.modulus = 16; } + if (self.modulus <= 0 || self.modulus > 16) + { + self.modulus = 2; + } + // Assume max picture settings initially. self.keepDisplayAspect = [preset[@"PictureKeepRatio"] boolValue]; -- cgit v1.2.3