summaryrefslogtreecommitdiff
path: root/toolkit/mozapps
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-03 11:08:58 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-03 11:08:58 +0200
commit59d4ba027526e94d79a6265e5435f756e2eed00f (patch)
treef106859495727da74c04d9b99902dafc9778e6b7 /toolkit/mozapps
parent35aa5708d65f836a7de900bfca1e36078849d94c (diff)
downloaduxp-59d4ba027526e94d79a6265e5435f756e2eed00f.tar.gz
[TychoAM] Make resilient to missing pref lightweightThemes.animation.enabled
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r--toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm12
1 files 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.