check for null bitmap, should fix #369

This commit is contained in:
Philipp Crocoll
2018-05-07 11:12:43 +02:00
parent 77593969b2
commit 9e80013e28

View File

@@ -121,8 +121,9 @@ namespace keepass2android.search
var customIconUuid = new PwUuid(MemUtil.HexStringToByteArray(uri.GetQueryParameter(CustomIconUuidParameter)));
var iconDrawable = _db.DrawableFactory.GetIconDrawable(App.Context, _db.KpDatabase, iconId, customIconUuid, false) as BitmapDrawable;
if (iconDrawable != null)
{
if ((iconDrawable != null) && (iconDrawable.Bitmap != null))
{
var pipe = ParcelFileDescriptor.CreatePipe();
var outStream = new OutputStreamInvoker(new ParcelFileDescriptor.AutoCloseOutputStream(pipe[1]));