check the validity of the iterator before using it

svn path=/trunk/KDE/kdelibs/; revision=884120
This commit is contained in:
Aaron J. Seigo 2008-11-14 10:37:56 +00:00
parent 9329ce25a2
commit 07c8015ade

View File

@ -306,7 +306,7 @@ void ToolTipManagerPrivate::showToolTip()
tooltip = tooltips.constFind(currentWidget);
//kDebug() << "attempt to make one ... we gots" << tooltip.isEmpty();
if (tooltip.value().isEmpty()) {
if (tooltip == tooltips.constEnd() || tooltip.value().isEmpty()) {
currentWidget = 0;
return;
}