Commit 3c8ac378 authored by Mike Gorse's avatar Mike Gorse Committed by Jim Nelson

Don't crash after deleting photo in full-window mode: Bug #732964

parent 4b9c3985
......@@ -27,6 +27,7 @@ Tobe Deprez <tobedeprez@gmx.com>
Guillaume Desmottes <gdesmott@gnome.org>
Fryderyk Dziarmagowski <fdziarmagowski@gmail.com>
Josh Freeman <josh@twilightedge.com>
Mike Gorse <mgorse@suse.com>
guillaumev <guillaume@viguierjust.com>
Chris Hemsing <c.hemsing@gmx.net>
Petr Heynch <petr.heynch@gmail.com>
......
......@@ -1358,7 +1358,7 @@ public abstract class EditingHostPage : SinglePhotoPage {
protected override bool on_shift_pressed(Gdk.EventKey? event) {
// show quick compare of original only if no tool is in use, the original pixbuf is handy
if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed())
if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed() && has_photo())
swap_in_original();
return base.on_shift_pressed(event);
......@@ -3144,6 +3144,9 @@ public class LibraryPhotoPage : EditingHostPage {
// move on to the next one in the collection
on_next_photo();
ViewCollection view = get_view();
view.remove_marked(view.mark(view.get_view_for_source(photo)));
if (photo.equals(get_photo())) {
// this indicates there is only one photo in the controller, or now zero, so switch
// to the Photos page, which is guaranteed to be there
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment