[Konversation-devel] [Bug 127336] crashs when making a simple dcop call
Shintaro Matsuoka
shin at shoegazed.org
Sat May 20 20:42:22 CEST 2006
------- 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=127336
------- Additional Comments From shin shoegazed org 2006-05-20 20:42 -------
SVN commit 542960 by shin:
make KonvDCOP::getNickname() check if the given server name is valid.
CCBUG: 127336
M +8 -2 konvdcop.cpp
--- trunk/extragear/network/konversation/src/konvdcop.cpp #542959:542960
@ -180,9 +180,15 @
kdDebug() << "KonvDCOP::unregisterEventHook(): hook id " << hookId << " not found!" << endl;
}
-QString KonvDCOP::getNickname (const QString &server)
+QString KonvDCOP::getNickname (const QString &serverName)
{
- return static_cast<KonversationApplication *>(kapp)->getServerByName(server)->getNickname();
+ Server* server = static_cast<KonversationApplication *>(kapp)->getServerByName(serverName);
+ if ( !server )
+ {
+ error( i18n( "getNickname: Server %1 is not found." ).arg( serverName ) );
+ return QString();
+ }
+ return server->getNickname();
}
QString KonvDCOP::getAnyNickname ()
More information about the Konversation-devel
mailing list