diff --git a/src/plugins/duieditor/duicodecompletion.cpp b/src/plugins/duieditor/duicodecompletion.cpp
index 6dbbce8e9d51a1f97e92edd9d4d8a6529e7a30e1..c0b0de1af748965fb3e587a148a3c4a0bd39c5b8 100644
--- a/src/plugins/duieditor/duicodecompletion.cpp
+++ b/src/plugins/duieditor/duicodecompletion.cpp
@@ -50,6 +50,9 @@ int DuiCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
     m_completions.clear();
 
     foreach (const QString &word, edit->words()) {
+        if (word.isEmpty())
+            continue;
+
         TextEditor::CompletionItem item(this);
         item.m_text = word;
         m_completions.append(item);