gnome-build r631 - in trunk: . src/gbf
- From: rbradford svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-build r631 - in trunk: . src/gbf
- Date: Sat, 27 Sep 2008 08:29:37 +0000 (UTC)
Author: rbradford
Date: Sat Sep 27 08:29:36 2008
New Revision: 631
URL: http://svn.gnome.org/viewvc/gnome-build?rev=631&view=rev
Log:
2008-09-26 Rob Bradford <rob linux intel com>
* src/gbf/gbf-project-view.c (get_icon):
Check the result of g_file_query_info to avoid a crash when the file
is missing. (Closes: #553975)
Modified:
trunk/ChangeLog
trunk/src/gbf/gbf-project-view.c
Modified: trunk/src/gbf/gbf-project-view.c
==============================================================================
--- trunk/src/gbf/gbf-project-view.c (original)
+++ trunk/src/gbf/gbf-project-view.c Sat Sep 27 08:29:36 2008
@@ -138,13 +138,21 @@
GdkPixbuf* pixbuf = NULL;
GFile* file;
GFileInfo* file_info;
+ GError *error = NULL;
file = g_file_new_for_uri (uri);
file_info = g_file_query_info (file,
G_FILE_ATTRIBUTE_STANDARD_ICON,
G_FILE_QUERY_INFO_NONE,
NULL,
- NULL);
+ &error);
+
+ if (!file_info)
+ {
+ g_warning (G_STRLOC ": Unable to query information for URI: %s: %s", uri, error->message);
+ g_clear_error (&error);
+ return NULL;
+ }
icon = g_file_info_get_icon(file_info);
g_object_get (icon, "names", &icon_names, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]