[shotwell/shotwell-0.26] Prevent crash when removing the event's last photo
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.26] Prevent crash when removing the event's last photo
- Date: Sun, 14 Jan 2018 15:58:38 +0000 (UTC)
commit d5cffacd4e8377cca9f5d4a4f7b0c5a3e69ff737
Author: Jens Georg <mail jensge org>
Date: Sat Jan 13 23:05:18 2018 +0100
Prevent crash when removing the event's last photo
Issue is that this would destroy the event and destroy the media page,
afterwards trying to update the undo list on the now destroyed view
https://bugzilla.gnome.org/show_bug.cgi?id=786531
src/MediaPage.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/MediaPage.vala b/src/MediaPage.vala
index a2d5185..d9084f3 100644
--- a/src/MediaPage.vala
+++ b/src/MediaPage.vala
@@ -816,14 +816,15 @@ public abstract class MediaPage : CheckerboardPage {
restore_point = get_view().get_next(cursor) as CheckerboardItem;
}
+ if ((restore_point != null) && (get_view().contains(restore_point))) {
+ set_cursor(restore_point);
+ }
+
if (get_view().get_selected_count() > 0) {
get_command_manager().execute(new TrashUntrashPhotosCommand(
(Gee.Collection<MediaSource>) get_view().get_selected_sources(), true));
}
- if ((restore_point != null) && (get_view().contains(restore_point))) {
- set_cursor(restore_point);
- }
}
protected virtual void on_edit_title() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]