Fix crash due to assertion in Qt when using Qt 4.8

=6  0x00007f34dd379ab5 in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
=7  0x00007f34dd37afb6 in abort () at abort.c:92
=8  0x00007f34df37d208 in qt_message_output (msgType=QtFatalMsg,
buf=0x158b628 "ASSERT: \"item_exists()\" in file
/home/kde/include/QtCore/qhash.h, line 1037") at global/qglobal.cpp:2255
=9  0x00007f34df37d384 in qt_message(QtMsgType, const char *, typedef
__va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f34df542188
"ASSERT: \"%s\" in file %s, line %d", ap=0x7fff4835b7e0) at
global/qglobal.cpp:2301
=10 0x00007f34df37dbf2 in qFatal (msg=0x7f34df542188 "ASSERT: \"%s\" in
file %s, line %d") at global/qglobal.cpp:2484
=11 0x00007f34df37cdbb in qt_assert (assertion=0x7f34d5cc7311
"item_exists()", file=0x7f34d5cc72f0 "/home/kde/include/QtCore/qhash.h",
line=1037) at global/qglobal.cpp:1999
=12 0x00007f34d5b109ef in QMutableHashIterator<QString,
Plasma::DataContainer*>::key (this=0x7fff4835b920) at
/home/kde/include/QtCore/qhash.h:1037
=13 0x00007f34d5b0db4a in Plasma::DataEngine::removeAllSources
(this=0x1007a90) at /home/kde/work/kdelibs/plasma/dataengine.cpp:335
This commit is contained in:
Valentin Rusu 2011-10-05 23:03:37 +02:00
parent ef069ab402
commit 03ff689d04

View File

@ -331,8 +331,8 @@ void DataEngine::removeAllSources()
while (it.hasNext()) {
it.next();
Plasma::DataContainer *s = it.value();
it.remove();
emit sourceRemoved(it.key());
it.remove();
s->disconnect(this);
delete s;
}