summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2017-08-06 18:36:14 +0200
committerDamiano Galassi <[email protected]>2017-08-06 18:36:14 +0200
commit0986b30c8296cd6275e406c6883d88833d2e1bc1 (patch)
treed0983531272390cc10856c534e4b3171be3e7909 /macosx
parent9d98250279e5337d3083bd8d33e38d1f88669c9a (diff)
MacGui: sanitise modulus values.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBPicture.m5
1 files changed, 5 insertions, 0 deletions
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];