tags 382491 + patch
thanks

On Sat, Sep 02, 2006 at 11:12:24PM +0200, Thomas Girard wrote:
> I'm trying to find out why.

That's a chicken-egg problem.  fileItem::fileItem tries to find the
file type before storing the associated pixmap (file_browser.cpp:824),
but the determineFiletype() will need this pixmap when displaying the
error.

Initialising the pixmap to NULL fixes the problem.  The patch is
attached.

Thomas
--- src/core/file_browser.cpp-  2006-09-03 01:46:02.001553000 +0200
+++ src/core/file_browser.cpp   2006-09-03 01:51:04.780475500 +0200
@@ -824,6 +824,7 @@
 fileItem::fileItem( Q3ListView * _parent, const QString & _name,
                                                const QString & _path ) :
        Q3ListViewItem( _parent, _name ),
+       m_pix( NULL ),
        m_path( _path )
 {
        determineFileType();
@@ -837,6 +838,7 @@
 fileItem::fileItem( Q3ListViewItem * _parent, const QString & _name,
                                                const QString & _path ) :
        Q3ListViewItem( _parent, _name ),
+       m_pix( NULL ),
        m_path( _path )
 {
        determineFileType();

Reply via email to