textbtree: Remove unnecessary check
authorBenjamin Otte <otte@redhat.com>
Mon, 10 Jul 2023 04:18:44 +0000 (06:18 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 10 Jul 2023 04:32:01 +0000 (06:32 +0200)
Since a93614409ed79e1297469bdc1de3cb69663de71e we don't allocate the
stack anymore, so this NULL check is unnecessary now - and it's flagged
by compilers.

gtk/gtktextbtree.c

index 41660839671d58059e9ce2235bcfe2517f8ff159..66ba20abdfdec1bf5c8b509bdc6736efd4451766 100644 (file)
@@ -3769,8 +3769,7 @@ _gtk_text_line_char_index (GtkTextLine *target_line)
   tos--;
 
   /* Check that we have the root node on top of the stack. */
-  g_assert (node_stack != NULL &&
-            node_stack[tos] != NULL &&
+  g_assert (node_stack[tos] != NULL &&
             node_stack[tos]->parent == NULL);
 
   /* Add up chars in all nodes before the nodes in our stack.