Check that the register completioncell tree view is realized before trying to scroll to point

This commit is contained in:
Robert Fewell
2023-08-06 11:37:25 +01:00
parent 0bd34a010e
commit 0a9e999cfd

View File

@@ -170,6 +170,9 @@ text_width (PangoLayout *layout)
static void
horizontal_scroll_to_found_text (PopBox* box, char* item_string, gint found_location)
{
if (!gtk_widget_get_realized (GTK_WIDGET(box->item_list->tree_view)))
return;
GtkAllocation alloc;
gtk_widget_get_allocation (GTK_WIDGET(box->item_list->tree_view), &alloc);
gint scroll_point = 0;