]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/main.c
fix i3bar crashing when I3SOCK present (#2471)
[i3/i3] / i3bar / src / main.c
index 3b5d75460d1f54862191cff8282be2343cf00b94..14e42a2bf425f9ec72a4689905ed0b145e9efc37 100644 (file)
@@ -93,6 +93,9 @@ int main(int argc, char **argv) {
     int opt;
     int option_index = 0;
     char *socket_path = getenv("I3SOCK");
+    if (socket_path != NULL) {
+        socket_path = sstrdup(socket_path);
+    }
     char *i3_default_sock_path = "/tmp/i3-ipc.sock";
 
     /* Initialize the standard config to use 0 as default */