Blob Blame History Raw
From 4d815754f9f32c54ec47f9e323940f6332a7cb5d Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Tue, 30 Apr 2019 10:32:13 +0200
Subject: [PATCH] Fix segmentation fault when using ibus-m17n with vi-telex in
 gedit in Gnome Wayland

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1704156
---
 src/m17n-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/m17n-core.c b/src/m17n-core.c
index fe5aa77..642dfee 100644
--- a/src/m17n-core.c
+++ b/src/m17n-core.c
@@ -930,6 +930,8 @@ m17n_object_unref (void *object)
   M17NObjectRecord *record;
   unsigned *count;
 
+  if (object == NULL)
+      return -1;
   if (! obj->ref_count_extended)
     {
       if (! --obj->ref_count)
-- 
2.20.1