[Bug 164653] Folderview crash at log-out

Sebastian Sauer mail at dipe.org
Sun Jun 22 12:53:22 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=164653         
mail dipe org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      everconfirmed|0                           |1



------- Additional Comments From mail dipe org  2008-06-22 12:53 -------
The prob is the
KNewMenu* m_newMenu
pointer since it will still point to the mem-address the KNewMenu* was on and didn't got set to NULL if the m_newMenu-instance got deleted. That in turn means, that each place that accessed the m_newMenu will probably deal with an invalid (aka deleted dangling) KNewMenu-pointer and crash.

Following should fix it (QPointer sets m_newMenu to NULL if the KNewMenu* got deleted);

Index: folderview.h
===================================================================
--- folderview.h        (revision 822884)
+++ folderview.h        (working copy)
 @ -22,6 +22,7  @

 #include <QPersistentModelIndex>
 #include <QStyleOption>
+#include <QPointer>

 #include <KActionCollection>

 @ -133,7 +134,7  @
     bool m_viewScrolled;
     QString m_filterFiles;
     QFont m_font;
-    KNewMenu *m_newMenu;
+    QPointer<KNewMenu> m_newMenu;
     KActionCollection m_actionCollection;
     QVector<ViewItem> m_items;
     int m_columns;


More information about the Panel-devel mailing list