Check for negative before appending the index, to avoid double error

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)
This commit is contained in:
Matthias Clasen
2005-06-08 20:26:27 +00:00
committed by Matthias Clasen
parent f12cb095f8
commit 0f440a3d4c
4 changed files with 15 additions and 1 deletions

View 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)

View 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)

View 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)

View File

@@ -362,7 +362,6 @@ 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)
{
@@ -370,6 +369,9 @@ gtk_tree_path_new_from_string (const gchar *path)
gtk_tree_path_free (retval);
return NULL;
}
gtk_tree_path_append_index (retval, i);
if (*ptr == '\000')
break;
if (ptr == path || *ptr != ':')