On Sun, Jun 17, 2012 at 10:53:54PM +0100, Thomas Adam wrote:
> Hi,
> 
> On 17 June 2012 22:50, Giorgio Lando <la...@imap.cc> wrote:
> >
> > On Sun, Jun 17, 2012, at 08:46 PM, Giorgio Lando wrote:
> >> 1) I start tmux;
> >> 2) I launch mutt with the following key binding defined in my tmux.conf:
> >> bind p neww -k -t:6 'mutt'
> >> 3) I suspend my laptop to ram;
> >> 4) I relaunch mutt with that same keybinding.
> 
> I can't reproduce this, but if you're using the SVN version that
> compiles with -g in CFLAGS, and a backtrace from gdb from a corefile
> would be really useful.

OK, I had to do a few things differently to you.  Does the following help?

diff --git a/trunk/cmd.c b/trunk/cmd.c
index 7aefeff..09b4922 100644
--- a/trunk/cmd.c
+++ b/trunk/cmd.c
@@ -1303,7 +1303,7 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd)
                /* Empty or relative path. */
                if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
                        root = ctx->cmdclient->cwd;
-               else if (ctx->curclient != NULL)
+               else if (ctx->curclient != NULL && s->curw != NULL)
                        root = osdep_get_cwd(s->curw->window->active->pid);
                else
                        return (s->cwd);

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to