[PolicyKit-gnome] Fix crashers if icons cannot be loaded
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [PolicyKit-gnome] Fix crashers if icons cannot be loaded
- Date: Thu, 3 Mar 2011 17:57:10 +0000 (UTC)
commit a8aba1618b400c25a346598894630acbd7f3333a
Author: David Zeuthen <davidz redhat com>
Date: Thu Mar 3 12:56:44 2011 -0500
Fix crashers if icons cannot be loaded
Signed-off-by: David Zeuthen <davidz redhat com>
src/polkitgnomeauthenticationdialog.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/polkitgnomeauthenticationdialog.c b/src/polkitgnomeauthenticationdialog.c
index d443c8e..743cc96 100644
--- a/src/polkitgnomeauthenticationdialog.c
+++ b/src/polkitgnomeauthenticationdialog.c
@@ -270,6 +270,7 @@ get_image (PolkitGnomeAuthenticationDialog *dialog)
GdkPixbuf *vendor_pixbuf;
GtkWidget *image;
+ image = NULL;
pixbuf = NULL;
copy_pixbuf = NULL;
vendor_pixbuf = NULL;
@@ -299,7 +300,12 @@ get_image (PolkitGnomeAuthenticationDialog *dialog)
0,
NULL);
if (pixbuf == NULL)
- goto out;
+ {
+ g_warning ("Unable to get a pixbuf for GTK_STOCK_DIALOG_AUTHENTICATION (%s) at size 48",
+ GTK_STOCK_DIALOG_AUTHENTICATION);
+ image = gtk_image_new_from_pixbuf (vendor_pixbuf);
+ goto out;
+ }
/* need to copy the pixbuf since we're modifying it */
copy_pixbuf = gdk_pixbuf_copy (pixbuf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]