[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/nepomuk/server
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2008-08-12 10:20:54
Message-ID: 1218536454.972456.3939.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 845703 by trueg:
Do not crash when stopping a service before it is initialized.
M +9 -1 servicecontroller.cpp
--- trunk/KDE/kdebase/runtime/nepomuk/server/servicecontroller.cpp #845702:845703
@@ -202,6 +202,12 @@
if( d->processControl ) {
d->processControl->stop();
}
+
+ // make sure all loops waiting for the service to initialize
+ // are terminated.
+ foreach( QEventLoop* loop, d->loops ) {
+ loop->exit();
+ }
}
}
@@ -230,8 +236,10 @@
if ( timeout > 0 ) {
QTimer::singleShot( timeout, &loop, SLOT(quit()) );
}
+ QPointer<ServiceController> guard = this;
loop.exec();
- d->loops.removeAll( &loop );
+ if ( !guard.isNull() )
+ d->loops.removeAll( &loop );
}
return d->initialized;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic