Skip to content
Snippets Groups Projects
Commit 652ff7c3 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

contacts: fix crash when deselecting contacts

- fixes crash when a contact item is deselected

Change-Id: I41801da8b62ff91f477bda1e6986d7c19255b462
Tuleap: #1024
parent 7c409f36
No related branches found
No related tags found
No related merge requests found
...@@ -228,9 +228,14 @@ SmartPanel::_smartList__SelectionChanged(Platform::Object^ sender, Windows::UI:: ...@@ -228,9 +228,14 @@ SmartPanel::_smartList__SelectionChanged(Platform::Object^ sender, Windows::UI::
{ {
auto listbox = safe_cast<ListBox^>(sender); auto listbox = safe_cast<ListBox^>(sender);
auto item = safe_cast<SmartPanelItem^>(listbox->SelectedItem); auto item = safe_cast<SmartPanelItem^>(listbox->SelectedItem);
if (item != nullptr) {
auto contact = safe_cast<Contact^>(item->_contact); auto contact = safe_cast<Contact^>(item->_contact);
ContactsViewModel::instance->selectedContact = contact; ContactsViewModel::instance->selectedContact = contact;
} }
else {
ContactsViewModel::instance->selectedContact = nullptr;
}
}
void void
SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e) SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment