Commit 23e510a3 authored by Eric Gregory's avatar Eric Gregory

3755 crash while deleting last photo in fullscreen mode

parent 0f7975db
......@@ -161,6 +161,10 @@ public class FullscreenWindow : PageWindow {
public void close() {
public override void destroy() {
Page? page = get_current_page();
......@@ -1190,6 +1190,7 @@ public abstract class EditingHostPage : SinglePhotoPage {
if (get_photo() != null)
set_zoom_state(ZoomState(get_photo().get_dimensions(), get_surface_dim(), 0.0));
// when cancelling zoom, panning becomes impossible, so set the cursor back to
......@@ -2900,9 +2901,13 @@ public class LibraryPhotoPage : EditingHostPage {
// this indicates there is only one photo in the controller, or about to be zero, so switch
// to the Photos page, which is guaranteed to be there when this disappears
if (photo.equals(get_photo()))
// to the library page, which is guaranteed to be there when this disappears
if (photo.equals(get_photo())) {
if (get_container() is FullscreenWindow)
((FullscreenWindow) get_container()).close();
get_command_manager().execute(new TrashUntrashPhotosCommand(photos, true));
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