eog/eog-fast-image-switch-crash.patch

44 lines
1.2 KiB
Diff

Index: libeog/eog-image.c
================================================================================
--- libeog/eog-image.c
+++ libeog/eog-image.c
@@ -946,8 +946,7 @@
}
if (eog_image_has_data (img, data2read)) {
- g_warning ("Image %s has requested data already loaded.\n",
- eog_image_get_caption (img));
+ return TRUE;
}
if (priv->status == EOG_IMAGE_STATUS_FAILED) {
--- shell/eog-window.c
+++ shell/eog-window.c
@@ -3221,7 +3221,7 @@
g_assert_not_reached ();
}
- g_object_unref (image);
+ eog_image_data_unref (image);
/* The companion lock is in job_image_load_action. */
eog_image_unlock (image);
@@ -3298,10 +3298,13 @@
data = g_new0 (EogJobImageLoadData, 1);
EOG_JOB_DATA (data)->window = window;
- data->image = image; /* no additional ref required, since
- * its already increased by
- * eog_wrap_list_get_first_selected_image
- */
+
+ data->image = eog_image_data_ref (image);
+
+ /* Need to unref this, because the refcount was already
+ * increased by eog_wrap_list_get_first_selected_image
+ */
+ g_object_unref (image);
job = eog_job_new_full (data,
job_image_load_action,