=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-switch-client.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/tmux/cmd-switch-client.c 2009/11/13 19:53:29 1.4 +++ src/usr.bin/tmux/cmd-switch-client.c 2010/01/23 17:50:56 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-switch-client.c,v 1.4 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-switch-client.c,v 1.5 2010/01/23 17:50:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -61,10 +61,12 @@ while ((opt = getopt(argc, argv, "c:t:")) != -1) { switch (opt) { case 'c': - data->name = xstrdup(optarg); + if (data->name == NULL) + data->name = xstrdup(optarg); break; case 't': - data->target = xstrdup(optarg); + if (data->target == NULL) + data->target = xstrdup(optarg); break; default: goto usage;