[cheese/wip/hans-fixes-master: 15/16] Fix assertion failures when taking a photo
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hans-fixes-master: 15/16] Fix assertion failures when taking a photo
- Date: Sun, 16 Jun 2013 20:59:25 +0000 (UTC)
commit 0cfc97bfa3ec22349540d6de09a9485d274b504a
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Jun 13 11:37:19 2013 +0200
Fix assertion failures when taking a photo
Before this patch, Cheese would log the following each time the user
takes a photo:
(cheese:21719): GLib-GIO-CRITICAL **: g_file_info_get_size: assertion `G_IS_FILE_INFO (info)' failed
(cheese:21719): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Signed-off-by: Hans de Goede <hdegoede redhat com>
src/thumbview/cheese-thumb-view.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
index c229b1a..a702fc0 100644
--- a/src/thumbview/cheese-thumb-view.c
+++ b/src/thumbview/cheese-thumb-view.c
@@ -205,6 +205,13 @@ cheese_thumb_view_append_item (CheeseThumbView *thumb_view, GFile *file)
info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, NULL,
NULL);
+ if (!info)
+ {
+ /* This is normal since photos first get created with a tmpname, ie:
+ * "2013-06-13-113155.jpg.DQRGYW" and then moved to their final name,
+ * we will get another append_item call for the final name. */
+ return;
+ }
size = g_file_info_get_size (info);
g_object_unref (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]