textview: Fix compiler warning

../gtk/gtktextview.c: In function ‘gtk_text_view_add_default_attributes’:
../gtk/gtktextview.c:10681:8: error: potential null pointer dereference [-Werror=null-dereference]
This commit is contained in:
Benjamin Otte 2024-08-06 17:49:14 +02:00
parent e58f9ea1b4
commit c60ae0b575

View File

@ -8221,7 +8221,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
GtkTextAttributes*
gtk_text_view_get_default_attributes (GtkTextView *text_view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), gtk_text_attributes_new());
gtk_text_view_ensure_layout (text_view);