Skip to content
Snippets Groups Projects
Commit eb6bfcae authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

Fix regression introduced last week

parent 5fa1ad22
No related branches found
No related tags found
No related merge requests found
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW)
endif(POLICY CMP0022)
INCLUDE(GNUInstallDirs) INCLUDE(GNUInstallDirs)
ADD_DEFINITIONS("-std=c++0x") ADD_DEFINITIONS("-std=c++0x")
......
...@@ -236,9 +236,12 @@ bool ContactModel::addContact(Contact* c) ...@@ -236,9 +236,12 @@ bool ContactModel::addContact(Contact* c)
//Deprecate the placeholder //Deprecate the placeholder
if (m_hPlaceholders.contains(c->uid())) { if (m_hPlaceholders.contains(c->uid())) {
m_hPlaceholders[c->uid()]->merge(c); Contact* c2 = m_hPlaceholders[c->uid()];
if (c2) {
c2->merge(c);
m_hPlaceholders[c->uid()] = nullptr; m_hPlaceholders[c->uid()] = nullptr;
} }
}
endInsertRows(); endInsertRows();
emit layoutChanged(); emit layoutChanged();
emit newContactAdded(c); emit newContactAdded(c);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment