glibmm r717 - in trunk: . glib/src



Author: murrayc
Date: Mon Aug 18 11:27:25 2008
New Revision: 717
URL: http://svn.gnome.org/viewvc/glibmm?rev=717&view=rev

Log:
2008-08-15  SzilÃrd Pfeiffer  <szilard pfeiffer gmail com>

* glib/src/nodetree.hg: Fixed pointer handling problem in find_child.
Bug #547909.

Modified:
   trunk/ChangeLog
   trunk/glib/src/nodetree.hg

Modified: trunk/glib/src/nodetree.hg
==============================================================================
--- trunk/glib/src/nodetree.hg	(original)
+++ trunk/glib/src/nodetree.hg	Mon Aug 18 11:27:25 2008
@@ -310,10 +310,10 @@
    */
   NodeTree<T>* find_child(const T& data, TraverseFlags flags = TRAVERSE_ALL)
   {
-    sigc::slot<void, GNode*, const T&, GNode*> real_slot = sigc::ptr_fun(on_compare_child);
+    sigc::slot<void, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_child);
 
     GNode* child = 0;
-    type_foreach_gnode_slot bound_slot = sigc::bind(real_slot, data, child);
+    type_foreach_gnode_slot bound_slot = sigc::bind(real_slot, data, &child);
 
     g_node_children_foreach(gobj(), (GTraverseFlags)flags, c_callback_foreach_compare_child, reinterpret_cast<gpointer>(&bound_slot));
     
@@ -660,11 +660,11 @@
   }
 
   /// Method for comparing a single child (Internal use).
-  static void on_compare_child(GNode* node, const T& needle, GNode* result)
+  static void on_compare_child(GNode* node, const T& needle, GNode** result)
   {
     if((0 != result) && (wrap(node)->data() == needle))
     {
-      result = node;
+      *result = node;
     }
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]