From ee5da989be3216486359498b61c68ff1f8b1633e Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 3 Jul 2018 11:08:58 +0200 Subject: [TychoAM] Make resilient to missing pref lightweightThemes.animation.enabled --- .../extensions/internal/LightweightThemeImageOptimizer.jsm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'toolkit/mozapps') diff --git a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm index a5bc23ccd..a9201c3da 100644 --- a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm +++ b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm @@ -59,10 +59,14 @@ var ImageCropper = { return aImageURL; } - if (Services.prefs.getBoolPref("lightweightThemes.animation.enabled")) { - //Don't crop if animated - return aImageURL; - } + try { + if (Services.prefs.getBoolPref("lightweightThemes.animation.enabled")) { + //Don't crop if animated + return aImageURL; + } + } catch(e) { + // Continue of pref doesn't exist. + } // Generate the cropped image's file name using its // base name and the current screen size. -- cgit v1.2.3