[gtk/fix-large-compose-file: 1/2] composetable: Add a missing NULL check
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-large-compose-file: 1/2] composetable: Add a missing NULL check
- Date: Mon, 2 May 2022 08:07:54 +0000 (UTC)
commit 5df314fa8f4ae6703876ed82bac340cce0495141
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 2 15:39:03 2022 +0800
composetable: Add a missing NULL check
gtk_compose_table_parse can return NULL. Handle it.
gtk/gtkcomposetable.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c
index 7951b04c4d..4ec357fc97 100644
--- a/gtk/gtkcomposetable.c
+++ b/gtk/gtkcomposetable.c
@@ -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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]