[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Seg Fault in KPanel /KDE_1_1_Branch
From:       Harri Porten <porten () tu-harburg ! de>
Date:       1999-07-05 14:10:15
[Download RAW message or body]

Stefan van den Oord wrote:
> 
> On Mon, 05 Jul 1999, Harri Porten wrote:
> > Carsten Balzer wrote:
> > >
> > > My KPanel dies with a segfault if I want to switch to another app via
> > > the
> > > windowlist in KPanel. The windowlist from the desktopbackground works
> > > fine.
> >
> > Mmmmh. I touched that part two weeks ago. I don't experience any
> > problems but I'll look into it.
> 
> Same problem here.

I just applied a fix the should fix the crash and the memory leak I had
observed. Could you please update the sources or apply the attached
patch ?

Harri.
["kpanel.patch" (text/plain)]

diff -u -r1.94.2.6 -r1.94.2.7
--- kpanel.C	1999/04/23 09:25:32	1.94.2.6
+++ kpanel.C	1999/07/05 13:54:08	1.94.2.7
@@ -55,6 +55,8 @@
 
     last_tip_widget = 0;
 
+    callbacklist = 0L;
+
     setFrameStyle(QFrame::Panel| QFrame::Raised);
 
     setMouseTracking(true);
diff -u -r1.60.4.5 -r1.60.4.6
--- tools.C	1999/06/24 01:26:02	1.60.4.5
+++ tools.C	1999/07/05 13:54:09	1.60.4.6
@@ -351,6 +351,8 @@
   int i = 0;
   int nw = kwmmapp->windows.count();
   p->clear();
+  if (callbacklist)
+    delete [] callbacklist;
   callbacklist = new Window[nw];
   for (w = kwmmapp->windows.first(); w; w = kwmmapp->windows.next())
     callbacklist[i++]=*w;
@@ -399,7 +401,6 @@
       }
     }
   }
-  delete [] callbacklist;
 }
 
 
@@ -409,7 +410,7 @@
   }
   else {
     Window w = callbacklist[item];
-    delete [] callbacklist;
+    //    delete [] callbacklist;
     KWM::activate(w);
   }
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic