[shotwell] Panic out if we cannot open the initial file
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Panic out if we cannot open the initial file
- Date: Sat, 21 May 2016 16:40:47 +0000 (UTC)
commit 7695f742b2225d99136de2e01dac926fe4cc80c2
Author: Jens Georg <mail jensge org>
Date: Sat May 21 18:07:43 2016 +0200
Panic out if we cannot open the initial file
src/direct/DirectPhotoPage.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/direct/DirectPhotoPage.vala b/src/direct/DirectPhotoPage.vala
index 6225a65..3d23528 100644
--- a/src/direct/DirectPhotoPage.vala
+++ b/src/direct/DirectPhotoPage.vala
@@ -242,7 +242,12 @@ public class DirectPhotoPage : EditingHostPage {
DirectPhoto? photo = DirectPhoto.global.get_file_source(initial_file);
- display_mirror_of(view_controller, photo);
+ if (photo != null) {
+ display_mirror_of(view_controller, photo);
+ } else {
+ AppWindow.panic(_("Unable open photo %s. Sorry.").printf(initial_file.get_path()));
+ }
+
initial_file = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]