Fix process filter crash caused by the use of an uninitialized variable
gtk_tree_view_get_visible_range() documentation states the following:
"Returns TRUE if valid paths were placed in start_path and end_path"
Closes: https://gitlab.xfce.org/apps/xfce4-taskmanager/-/issues/71
Fixes: 8500675125
This commit is contained in:
@@ -268,13 +268,13 @@ xtm_process_window_unstick_view_cursor (GtkTreeView *tree_view, XtmProcessWindow
|
|||||||
if (! window->view_stuck)
|
if (! window->view_stuck)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_tree_view_get_cursor (tree_view, &cursor, NULL);
|
if (gtk_tree_view_get_visible_range (tree_view, NULL, &end)) {
|
||||||
gtk_tree_view_get_visible_range (tree_view, NULL, &end);
|
gtk_tree_view_get_cursor (tree_view, &cursor, NULL);
|
||||||
if (gtk_tree_path_compare (cursor, end) >= 0)
|
if (cursor != NULL && gtk_tree_path_compare (cursor, end) >= 0)
|
||||||
window->view_stuck = FALSE;
|
window->view_stuck = FALSE;
|
||||||
|
gtk_tree_path_free (cursor);
|
||||||
gtk_tree_path_free (cursor);
|
gtk_tree_path_free (end);
|
||||||
gtk_tree_path_free (end);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user