[pygobject] tests: Fix crash with empty drag source icon names
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Fix crash with empty drag source icon names
- Date: Sun, 21 Feb 2016 03:56:38 +0000 (UTC)
commit 8145fa69c8ace9772687f26f782acb5e461776be
Author: Simon Feltman <sfeltman src gnome org>
Date: Sat Feb 20 17:32:01 2016 -0800
tests: Fix crash with empty drag source icon names
Add "_About" argument when testing call to drag_source_set_icon_name().
Add Gtk.STOCK_ABOUT argument when testing call to drag_source_set_icon_stock().
This avoids crashes due to GTK+ drag source attempting to unref a NULL pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=762392
tests/test_overrides_gtk.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py
index 9aa592c..f184152 100644
--- a/tests/test_overrides_gtk.py
+++ b/tests/test_overrides_gtk.py
@@ -516,9 +516,9 @@ class TestGtk(unittest.TestCase):
widget.drag_source_add_image_targets()
widget.drag_source_add_text_targets()
widget.drag_source_add_uri_targets()
- widget.drag_source_set_icon_name("")
+ widget.drag_source_set_icon_name("_About")
widget.drag_source_set_icon_pixbuf(GdkPixbuf.Pixbuf())
- widget.drag_source_set_icon_stock("")
+ widget.drag_source_set_icon_stock(Gtk.STOCK_ABOUT)
widget.drag_source_get_target_list()
widget.drag_source_set_target_list(None)
widget.drag_source_set_target_list(Gtk.TargetList.new([Gtk.TargetEntry.new('test', 0, 0)]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]