summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch
blob: 606d3ece6fc4c33b0ce7e9fa3c570d64b0289e52 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Fix contributed upstream here:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694.

Index: emacs-26.3/src/xfns.c
===================================================================
--- emacs-26.3.orig/src/xfns.c
+++ emacs-26.3/src/xfns.c
@@ -2533,6 +2533,8 @@ xic_free_xfontset (struct frame *f)
 static XIMStyle
 best_xim_style (XIMStyles *xim)
 {
+  if (xim == NULL) goto out;
+
   int i, j;
   int nr_supported = ARRAYELTS (supported_xim_styles);

@@ -2541,6 +2543,7 @@ best_xim_style (XIMStyles *xim)
       if (supported_xim_styles[i] == xim->supported_styles[j])
	return supported_xim_styles[i];

+ out:
   /* Return the default style.  */
   return XIMPreeditNothing | XIMStatusNothing;
 }