summaryrefslogtreecommitdiff
path: root/src/text-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/text-backend.c')
-rw-r--r--src/text-backend.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/text-backend.c b/src/text-backend.c
index 7d2a0640..e9578a41 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -938,11 +938,14 @@ text_backend_configuration(struct text_backend *text_backend)
{
struct weston_config_section *section;
char *client;
+ int ret;
section = weston_config_get_section(text_backend->compositor->config,
"input-method", NULL, NULL);
- asprintf(&client, "%s/weston-keyboard",
- weston_config_get_libexec_dir());
+ ret = asprintf(&client, "%s/weston-keyboard",
+ weston_config_get_libexec_dir());
+ if (ret < 0)
+ client = NULL;
weston_config_section_get_string(section, "path",
&text_backend->input_method.path,
client);