PKGBUILDs/extra/kdepim/fix-ldap-crash.path

23 lines
900 B
SYSTEMD
Raw Normal View History

2009-10-10 02:23:22 +00:00
diff -u libkdepim/addresseelineedit.cpp libkdepim/addresseelineedit.cpp
--- libkdepim/addresseelineedit.cpp (revision 1019119)
+++ libkdepim/addresseelineedit.cpp (revision 1019358)
@@ -800,7 +800,7 @@
void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList &adrs )
{
- if ( s_LDAPLineEdit != this ) {
+ if ( adrs.isEmpty() || s_LDAPLineEdit != this ) {
return;
}
@@ -817,7 +817,8 @@
setText( m_previousAddresses + m_searchString );
// only complete again if the user didn't change the selection while
// we were waiting; otherwise the completion box will be closed
- if ( m_searchString.trimmed() != completionBox()->currentItem()->text().trimmed() ) {
+ QListWidgetItem *current = completionBox()->currentItem();
+ if ( !current || m_searchString.trimmed() != current->text().trimmed() ) {
doCompletion( m_lastSearchMode );
}
}