qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs dired.c qe.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs dired.c qe.c
Date: Sat, 01 Mar 2014 19:24:02 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/03/01 19:24:02

Modified files:
        .              : dired.c qe.c 

Log message:
        Add NULL pointer checks, avoid crash bugs

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/dired.c?cvsroot=qemacs&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.150&r2=1.151

Patches:
Index: dired.c
===================================================================
RCS file: /sources/qemacs/qemacs/dired.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- dired.c     12 Feb 2014 07:25:35 -0000      1.38
+++ dired.c     1 Mar 2014 19:24:02 -0000       1.39
@@ -463,10 +463,10 @@
     /* close previous temporary buffers, if any */
     /* CG: Should use the do_find_alternate to replace buffer */
     b = e->b;
-    if ((b->flags & BF_PREVIEW) && !b->modified) {
+    if (b && (b->flags & BF_PREVIEW) && !b->modified) {
         /* free the buffer if no longer viewed */
         b->flags |= BF_TRANSIENT;
-        switch_to_buffer(e, NULL);
+        //switch_to_buffer(e, NULL);
     }
 
     if (e) {

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -b -r1.150 -r1.151
--- qe.c        10 Feb 2014 21:21:40 -0000      1.150
+++ qe.c        1 Mar 2014 19:24:02 -0000       1.151
@@ -5753,7 +5753,7 @@
     //    s = qs->active_window;
     //}
 
-    if (kill_buffer) {
+    if (kill_buffer && s->b) {
         /* CG: this behaviour is not correct */
         /* CG: should have a direct primitive */
         do_kill_buffer(s, s->b->name);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]