KDirOperator::resetCursor() crash

Jarosław Staniek js at iidea.pl
Tue Oct 16 11:59:14 BST 2007


Hello,

We have the following code:

void KDirOperator::resetCursor()
{
     QApplication::restoreOverrideCursor();
     d->progressBar->hide();
}

KDirOperator::~KDirOperator()
{
     resetCursor();
     delete d;
}


In my app there is a structure declared with K_GLOBAL_STATIC containing a 
pointer to GUI with KFileWidget. Thus, when KCleanUpGlobalStatic deletes 
KFileWidget, ~KDirOperator() is called, and then KDirOperator::resetCursor().
But we have no qApp object at the moment.

Shouldn't we put 'if (qApp)' to the destructor?

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list