aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-03-31 03:17:38 +0200
committerRobert Tari <robert@tari.in>2021-03-31 03:17:38 +0200
commitc942c531739e660348f76cb0dc8d8bb66ce8be81 (patch)
treee5005df3692cb4b49b5c759507ffc6e91a7a5f82 /src
parent9baaba3236f0e1ec6d253d6d01b88142d73c640a (diff)
downloadayatana-indicator-keyboard-c942c531739e660348f76cb0dc8d8bb66ce8be81.tar.gz
ayatana-indicator-keyboard-c942c531739e660348f76cb0dc8d8bb66ce8be81.tar.bz2
ayatana-indicator-keyboard-c942c531739e660348f76cb0dc8d8bb66ce8be81.zip
src/keyboard.c: Test if layout variant is null before checking length
fixes #5
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c2
1 files changed, 1 insertions, 1 deletions
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);
}