App: Pages: Add a null check in OnSelectTemplate() (#243)

To avoid accessing a null poiter add a null check in OnSelectTemplate().

Signed-off-by: Alistair Francis <alistair@alistair23.me>
This commit is contained in:
Alistair Francis 2018-01-04 20:33:11 -08:00 committed by Kyle Spearrin
parent ca03a5ecf4
commit 71dd4e512e

View file

@ -350,6 +350,10 @@ namespace Bit.App.Pages
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
if(item == null)
{
return null;
}
return ((GroupingOrCipher)item).Cipher == null ? GroupingTemplate : CipherTemplate;
}
}