From 537c45f518715f85bdbf107339e17526057f05ab Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 15 May 2014 15:41:54 +0200 Subject: [PATCH] Check zoom percentage is >= 0% --- qutebrowser/widgets/webview.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/widgets/webview.py b/qutebrowser/widgets/webview.py index 20740f8d7..c252473bb 100644 --- a/qutebrowser/widgets/webview.py +++ b/qutebrowser/widgets/webview.py @@ -251,6 +251,8 @@ class WebView(QWebView): """ if fuzzyval: self._zoom.fuzzyval = int(perc) + if perc < 0: + raise CommandError("Can't zoom {}%!".format(perc)) self.setZoomFactor(float(perc) / 100) message.info("Zoom level: {}%".format(perc))