composetable: Add a missing NULL check
authorMatthias Clasen <mclasen@redhat.com>
Mon, 2 May 2022 07:39:03 +0000 (15:39 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 2 May 2022 07:39:03 +0000 (15:39 +0800)
gtk_compose_table_parse can return NULL. Handle it.

gtk/gtkcomposetable.c

index 7951b04c4dd255cbcbf75002a51be676e9b0bf79..4ec357fc97e6fd4a88974d7678f0f81455926542 100644 (file)
@@ -1150,7 +1150,8 @@ parse:
    * is probably a copy of the system one, we take steps to keep things working,
    * and thell the user about it.
    */
-  if (found_old_cache && !found_include && compose_table->n_sequences < 100)
+  if (found_old_cache && !found_include &&
+      compose_table != NULL && compose_table->n_sequences < 100)
     {
       if (rewrite_compose_file (compose_file))
         {