From c942c531739e660348f76cb0dc8d8bb66ce8be81 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 31 Mar 2021 03:17:38 +0200 Subject: src/keyboard.c: Test if layout variant is null before checking length fixes #5 --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index 7e9d44fc..e88a3583 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -223,7 +223,7 @@ void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gc gchar *sVariant = pKeyboard->pPrivate->pConfigRec->variants[nLayout]; gchar *sId; - if (strlen(sVariant)) + if (sVariant && strlen(sVariant)) { sId = g_strconcat(sLayout, "+", sVariant, NULL); } -- cgit v1.2.3