diff options
-rw-r--r-- | swaygrab/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swaygrab/main.c b/swaygrab/main.c index 403f7b38..82d623e7 100644 --- a/swaygrab/main.c +++ b/swaygrab/main.c @@ -229,7 +229,7 @@ int main(int argc, char **argv) { sway_abort("Invalid usage. See `man swaygrab` %d %d", argc, optind); } } else if (optind < argc) { - file = argv[optind]; + file = strdup(argv[optind]); } int socketfd = ipc_open_socket(socket_path); |