mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
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:
parent
ca03a5ecf4
commit
71dd4e512e
1 changed files with 4 additions and 0 deletions
|
@ -350,6 +350,10 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
|
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
|
||||||
{
|
{
|
||||||
|
if(item == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return ((GroupingOrCipher)item).Cipher == null ? GroupingTemplate : CipherTemplate;
|
return ((GroupingOrCipher)item).Cipher == null ? GroupingTemplate : CipherTemplate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue