Revision: 2824
          http://tmux.svn.sourceforge.net/tmux/?rev=2824&view=rev
Author:   tcunha
Date:     2012-06-18 15:15:32 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
Sync OpenBSD patchset 1136:

Add a couple of NULL pointer checks to key binding functions, from
jspenguin on SF bug 3535531.

Modified Paths:
--------------
    trunk/key-bindings.c

Modified: trunk/key-bindings.c
===================================================================
--- trunk/key-bindings.c        2012-06-18 15:14:48 UTC (rev 2823)
+++ trunk/key-bindings.c        2012-06-18 15:15:32 UTC (rev 2824)
@@ -207,6 +207,9 @@
        va_list ap;
        char   *msg;
 
+       if (ctx->curclient->session == NULL)
+               return;
+
        va_start(ap, fmt);
        xvasprintf(&msg, fmt, ap);
        va_end(ap);
@@ -219,9 +222,13 @@
 void printflike2
 key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...)
 {
-       struct winlink  *wl = ctx->curclient->session->curw;
+       struct winlink  *wl;
        va_list          ap;
 
+       if (ctx->curclient->session == NULL)
+               return;
+
+       wl = ctx->curclient->session->curw;
        if (wl->window->active->mode != &window_copy_mode) {
                window_pane_reset_mode(wl->window->active);
                window_pane_set_mode(wl->window->active, &window_copy_mode);
@@ -239,6 +246,9 @@
        va_list ap;
        char   *msg;
 
+       if (ctx->curclient->session == NULL)
+               return;
+
        if (options_get_number(&global_options, "quiet"))
                return;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
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-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to