Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: ui/file_manager/gallery/js/gallery_item.js

Issue 1006833002: Gallery.app : shows an error message when it fails to save an image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed string resource. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery_item.js
diff --git a/ui/file_manager/gallery/js/gallery_item.js b/ui/file_manager/gallery/js/gallery_item.js
index 565067495ac31a8ed361654e43c21ad04aefe3a6..4fe4bf5995754b46be182bde820b28864925d81c 100644
--- a/ui/file_manager/gallery/js/gallery_item.js
+++ b/ui/file_manager/gallery/js/gallery_item.js
@@ -306,9 +306,11 @@ Gallery.Item.prototype.saveToFile = function(
}).then(onSuccess.bind(null, fileEntry))
.catch(function(error) {
onError(error);
- // Disable all callbacks on the first error.
- fileWriter.onerror = null;
- fileWriter.onwriteend = null;
+ if (fileWriter) {
+ // Disable all callbacks on the first error.
+ fileWriter.onerror = null;
+ fileWriter.onwriteend = null;
+ }
});
}.bind(this);
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698