[gtk+] gail: don't try to get stock id from images that aren't stock
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gail: don't try to get stock id from images that aren't stock
- Date: Thu, 7 Oct 2010 06:53:11 +0000 (UTC)
commit cadbdd32ba9c610b28fb45dd5d6fd8f2a4c040f2
Author: William Jon McCann <jmccann redhat com>
Date: Thu Oct 7 02:48:20 2010 -0400
gail: don't try to get stock id from images that aren't stock
Fixes assertion caused by 41d2a4d059d881d8d05419013ae4946a81b308cb
modules/other/gail/gailimage.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/modules/other/gail/gailimage.c b/modules/other/gail/gailimage.c
index 38d0c58..da86985 100644
--- a/modules/other/gail/gailimage.c
+++ b/modules/other/gail/gailimage.c
@@ -146,9 +146,11 @@ gail_image_get_name (AtkObject *accessible)
g_free (image_accessible->stock_name);
image_accessible->stock_name = NULL;
+ if (gtk_image_get_storage_type (image) != GTK_IMAGE_STOCK)
+ return NULL;
+
gtk_image_get_stock (image, &stock_id, NULL);
- if (gtk_image_get_storage_type (image) != GTK_IMAGE_STOCK ||
- stock_id == NULL)
+ if (stock_id == NULL)
return NULL;
if (!gtk_stock_lookup (stock_id, &stock_item))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]