add mutex for thread safety
diff --git a/chatdialog.h b/chatdialog.h
index 312ebb0..e5e0c34 100644
--- a/chatdialog.h
+++ b/chatdialog.h
@@ -1,6 +1,7 @@
 #ifndef CHATDIALOG_H
 #define CHATDIALOG_H
 #include <boost/function.hpp>
+#include <boost/thread/mutex.hpp>
 #include <vector>
 #include "digesttreescene.h"
 #include "ui_chatdialog.h"
@@ -53,5 +54,7 @@
   Sync::SyncAppSocket *m_sock;
   uint32_t m_session;
   DigestTreeScene *m_scene;
+  boost::mutex m_msgMutex;
+  boost::mutex m_sceneMutex;
 };
 #endif