Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi/dist/vi Avoid repainting after screen has b...



details:   https://anonhg.NetBSD.org/src/rev/dd7680c91b9b
branches:  trunk
changeset: 791628:dd7680c91b9b
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 26 16:48:01 2013 +0000

description:
Avoid repainting after screen has been destroyed.

diffstat:

 external/bsd/nvi/dist/vi/vs_msg.c     |  4 +++-
 external/bsd/nvi/dist/vi/vs_refresh.c |  7 +++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 86f5164156d6 -r dd7680c91b9b external/bsd/nvi/dist/vi/vs_msg.c
--- a/external/bsd/nvi/dist/vi/vs_msg.c Tue Nov 26 16:32:04 2013 +0000
+++ b/external/bsd/nvi/dist/vi/vs_msg.c Tue Nov 26 16:48:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vs_msg.c,v 1.3 2013/11/25 22:43:46 christos Exp $ */
+/*     $NetBSD: vs_msg.c,v 1.4 2013/11/26 16:48:01 christos Exp $ */
 /*-
  * Copyright (c) 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -661,6 +661,8 @@
        gp = sp->gp;
        wp = sp->wp;
        vip = VIP(sp);
+       if (vip == NULL)
+               return 0;
        if (csp == NULL)
                csp = sp;
 
diff -r 86f5164156d6 -r dd7680c91b9b external/bsd/nvi/dist/vi/vs_refresh.c
--- a/external/bsd/nvi/dist/vi/vs_refresh.c     Tue Nov 26 16:32:04 2013 +0000
+++ b/external/bsd/nvi/dist/vi/vs_refresh.c     Tue Nov 26 16:48:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vs_refresh.c,v 1.3 2013/11/25 22:43:46 christos Exp $ */
+/*     $NetBSD: vs_refresh.c,v 1.4 2013/11/26 16:48:01 christos Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -81,7 +81,8 @@
                        (void)vs_paint(tsp,
                            (F_ISSET(VIP(tsp), VIP_CUR_INVALID) ?
                            UPDATE_CURSOR : 0) | UPDATE_SCREEN);
-                       F_SET(VIP(sp), VIP_CUR_INVALID);
+                       if (VIP(sp))
+                               F_SET(VIP(sp), VIP_CUR_INVALID);
                }
 
        /*
@@ -155,6 +156,8 @@
 
        gp = sp->gp;
        vip = VIP(sp);
+       if (vip == NULL)
+               return 0;
        didpaint = leftright_warp = 0;
 
        /*



Home | Main Index | Thread Index | Old Index