From 9c9ba7c6c88dc77d019508e69ce2b34e78ee287d Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 3 Jul 2018 11:08:58 +0200 Subject: [PATCH] [TychoAM] Make resilient to missing pref lightweightThemes.animation.enabled --- .../internal/LightweightThemeImageOptimizer.jsm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm index a5bc23ccd3..a9201c3da6 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.