]> git.sur5r.net Git - i3/i3/commitdiff
i3-input: Bugfix: Don’t try to convert the prompt if there is no prompt
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 7 Oct 2009 19:28:15 +0000 (21:28 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 7 Oct 2009 19:28:15 +0000 (21:28 +0200)
i3-input/main.c

index 9b856d8a60f1f7219f3fe4bb3353505b60c74092..a3bc9de366a875c19baab7be503fd3b88d2513f8 100644 (file)
@@ -274,7 +274,8 @@ int main(int argc, char *argv[]) {
 
         sockfd = connect_ipc(socket_path);
 
-        prompt = convert_utf8_to_ucs2(prompt, &prompt_len);
+        if (prompt != NULL)
+                prompt = convert_utf8_to_ucs2(prompt, &prompt_len);
 
         int screens;
         xcb_connection_t *conn = xcb_connect(NULL, &screens);