diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-03 11:08:58 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-03 11:08:58 +0200 |
commit | ee5da989be3216486359498b61c68ff1f8b1633e (patch) | |
tree | f106859495727da74c04d9b99902dafc9778e6b7 /toolkit/mozapps/extensions | |
parent | 4666691b63efc35fd31fbd1666d7f193fa1fde3e (diff) | |
download | UXP-ee5da989be3216486359498b61c68ff1f8b1633e.tar UXP-ee5da989be3216486359498b61c68ff1f8b1633e.tar.gz UXP-ee5da989be3216486359498b61c68ff1f8b1633e.tar.lz UXP-ee5da989be3216486359498b61c68ff1f8b1633e.tar.xz UXP-ee5da989be3216486359498b61c68ff1f8b1633e.zip |
[TychoAM] Make resilient to missing pref lightweightThemes.animation.enabled
Diffstat (limited to 'toolkit/mozapps/extensions')
-rw-r--r-- | toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm | 12 |
1 files changed, 8 insertions, 4 deletions
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. |