]> Pileus Git - ~andy/gtk/commitdiff
Check for negative before appending the index, to avoid double error
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jun 2005 20:25:21 +0000 (20:25 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 8 Jun 2005 20:25:21 +0000 (20:25 +0000)
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for
negative before appending the index, to avoid double error
message.  (#306393, Morten Welinder)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktreemodel.c

index 8b3d0f2ef7828c218aa2235ad3051e48f79f70a4..9af287c0ae4ce07f3f606aad60423e49c5b8dc00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-06-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for
+       negative before appending the index, to avoid double error
+       message.  (#306393, Morten Welinder)
+
        * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): 
        Don't crash if search_window is NULL.  (#304914, Victor Osadci,
        testcase by Olaf Vitters)
index 8b3d0f2ef7828c218aa2235ad3051e48f79f70a4..9af287c0ae4ce07f3f606aad60423e49c5b8dc00 100644 (file)
@@ -1,5 +1,9 @@
 2005-06-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for
+       negative before appending the index, to avoid double error
+       message.  (#306393, Morten Welinder)
+
        * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): 
        Don't crash if search_window is NULL.  (#304914, Victor Osadci,
        testcase by Olaf Vitters)
index 8b3d0f2ef7828c218aa2235ad3051e48f79f70a4..9af287c0ae4ce07f3f606aad60423e49c5b8dc00 100644 (file)
@@ -1,5 +1,9 @@
 2005-06-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for
+       negative before appending the index, to avoid double error
+       message.  (#306393, Morten Welinder)
+
        * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): 
        Don't crash if search_window is NULL.  (#304914, Victor Osadci,
        testcase by Olaf Vitters)
index 1ec9cf24861596971ddb256ed3b7d31c505ac584..4ca2d0ae1dc6cd6fc09c62218ef2e62a71170e34 100644 (file)
@@ -362,14 +362,15 @@ gtk_tree_path_new_from_string (const gchar *path)
   while (1)
     {
       i = strtol (path, &ptr, 10);
-      gtk_tree_path_append_index (retval, i);
-
       if (i < 0)
        {
          g_warning (G_STRLOC ": Negative numbers in path %s passed to gtk_tree_path_new_from_string", orig_path);
          gtk_tree_path_free (retval);
          return NULL;
        }
+
+      gtk_tree_path_append_index (retval, i);
+
       if (*ptr == '\000')
        break;
       if (ptr == path || *ptr != ':')