Commit 92cc6c4c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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)
parent d53bffc0
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)
......
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)
......
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)
......
......@@ -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 != ':')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment