gnome-shell/0001-inputMethod-Add-a-null-check-for-text-in-vfunc_set_s.patch

28 lines
816 B
Diff
Raw Normal View History

From 0cf2d396b0d584f59402a6a0c42376639bd314ef Mon Sep 17 00:00:00 2001
From: Andrea Azzarone <andrea.azzarone@canonical.com>
Date: Mon, 17 Sep 2018 18:00:04 +0200
Subject: [PATCH] inputMethod: Add a null-check for text in
vfunc_set_surrounding.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/579
---
js/misc/inputMethod.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 320a6cc33..ec84f7277 100644
--- a/js/misc/inputMethod.js
+++ b/js/misc/inputMethod.js
@@ -176,7 +176,7 @@ var InputMethod = new Lang.Class({
},
vfunc_set_surrounding(text, cursor, anchor) {
- if (this._context)
+ if (this._context && text)
this._context.set_surrounding_text(text, cursor, anchor);
},
--
2.19.0