Crash when EVE client is closed while the thumbnail is recreated or updated

This commit is contained in:
Anton Kasyanov
2016-06-05 18:04:00 +03:00
parent daa18558eb
commit 68e1a32009

View File

@@ -153,8 +153,15 @@ namespace EveOPreview.UI
this._currentHeight = this.ClientRectangle.Bottom;
this._Thumbnail.rcDestination = new RECT(0, 0, this._currentWidth, this._currentHeight);
try
{
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._ThumbnailHandle, this._Thumbnail);
}
catch (ArgumentException)
{
//This exception will be thrown if the EVE client disappears while this method is running
}
}
if (!(this.IsOverlayEnabled && (sizeChanged || locationChanged)))
{