commit | 32cbdce726462cf0f49f2e207e45019d827aabbe | [log] [tgz] |
---|---|---|
author | Zhenkai Zhu <zhenkai@cs.ucla.edu> | Tue Oct 02 11:09:38 2012 -0700 |
committer | Zhenkai Zhu <zhenkai@cs.ucla.edu> | Tue Oct 02 11:09:38 2012 -0700 |
tree | b5bead9fca9bcc21229dfa1fc17bdacbf2c112af | |
parent | 5f52d88110c18cab046e0e83b09e3e0143af7f03 [diff] [blame] |
do not display leave msg if no nick is found
diff --git a/chatdialog.cpp b/chatdialog.cpp index d8010a0..558f40a 100644 --- a/chatdialog.cpp +++ b/chatdialog.cpp
@@ -114,9 +114,13 @@ QStringListIterator it(staleUserList); while(it.hasNext()) { + std::string nick = it.next().toStdString(); + if (nick.empty()) + continue; + SyncDemo::ChatMessage msg; formControlMessage(msg, SyncDemo::ChatMessage::LEAVE); - msg.set_from(it.next().toStdString()); + msg.set_from(nick); appendMessage(msg); } }