diff options
Diffstat (limited to 'src/PhotoPage.vala')
-rw-r--r-- | src/PhotoPage.vala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala index 5e94c24..3ab0f6b 100644 --- a/src/PhotoPage.vala +++ b/src/PhotoPage.vala @@ -835,7 +835,9 @@ public abstract class EditingHostPage : SinglePhotoPage { photo_changing(photo); DataView view = get_view().get_view_for_source(photo); - assert(view != null); + if (view == null) { + return; + } // Select photo. get_view().unselect_all(); @@ -966,7 +968,7 @@ public abstract class EditingHostPage : SinglePhotoPage { return photo.has_transformations() || photo.has_editable(); } - private void on_pixbuf_fetched(Photo photo, owned Gdk.Pixbuf? pixbuf, Error? err) { + private void on_pixbuf_fetched(Photo photo, Gdk.Pixbuf? pixbuf, Error? err) { // if not of the current photo, nothing more to do if (!photo.equals(get_photo())) return; @@ -987,6 +989,7 @@ public abstract class EditingHostPage : SinglePhotoPage { if (tool_pixbuf != null) { pixbuf = tool_pixbuf; + pixbuf.ref(); max_dim = tool_pixbuf_dim; } } catch(Error err) { @@ -1254,6 +1257,10 @@ public abstract class EditingHostPage : SinglePhotoPage { } private void quick_update_pixbuf() { + if (get_photo() == null) { + return; + } + Gdk.Pixbuf? pixbuf = cache.get_ready_pixbuf(get_photo()); if (pixbuf != null) { set_pixbuf(pixbuf, get_photo().get_dimensions()); |