Fixing bugs in checking uninstalled certificate
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index e978738..adcb32d 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -70,12 +70,16 @@
   setKeychain();
 
   m_defaultIdentity = m_keychain->getDefaultIdentity();
-  m_contactManager->setDefaultIdentity(m_defaultIdentity);
-  m_nickName = m_defaultIdentity.get(-1).toUri();
-  m_settingDialog->setIdentity(m_defaultIdentity.toUri(), m_nickName);
+  if(m_defaultIdentity.size() == 0)
+    showError(QString::fromStdString("certificate of ") + QString::fromStdString(m_defaultIdentity.toUri()) + " is missing!\nHave you installed the certificate?");
   Name defaultCertName = m_keychain->getIdentityManager()->getDefaultCertificateNameByIdentity(m_defaultIdentity);
   if(defaultCertName.size() == 0)
     showError(QString::fromStdString("certificate of ") + QString::fromStdString(m_defaultIdentity.toUri()) + " is missing!\nHave you installed the certificate?");
+
+
+  m_contactManager->setDefaultIdentity(m_defaultIdentity);
+  m_nickName = m_defaultIdentity.get(-1).toUri();
+  m_settingDialog->setIdentity(m_defaultIdentity.toUri(), m_nickName);
   
 
   m_profileEditor = new ProfileEditor(m_contactManager);
diff --git a/src/contactpanel.h b/src/contactpanel.h
index a203642..d36e547 100644
--- a/src/contactpanel.h
+++ b/src/contactpanel.h
@@ -26,7 +26,7 @@
 #include "chatdialog.h"
 #include "endorse-combobox-delegate.h"
 #include "browsecontactdialog.h"
-#include "warningDialog.h"
+#include "warningdialog.h"
 
 #ifndef Q_MOC_RUN
 #include "contact-manager.h"