Commit 652ff7c3 authored by atraczyk's avatar atraczyk

contacts: fix crash when deselecting contacts

- fixes crash when a contact item is deselected

Change-Id: I41801da8b62ff91f477bda1e6986d7c19255b462
Tuleap: #1024
parent 7c409f36
......@@ -228,8 +228,13 @@ SmartPanel::_smartList__SelectionChanged(Platform::Object^ sender, Windows::UI::
{
auto listbox = safe_cast<ListBox^>(sender);
auto item = safe_cast<SmartPanelItem^>(listbox->SelectedItem);
auto contact = safe_cast<Contact^>(item->_contact);
ContactsViewModel::instance->selectedContact = contact;
if (item != nullptr) {
auto contact = safe_cast<Contact^>(item->_contact);
ContactsViewModel::instance->selectedContact = contact;
}
else {
ContactsViewModel::instance->selectedContact = nullptr;
}
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment