Skip to content

Commit

Permalink
Fixed IPreviewHandler exception handling (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan authored Jul 29, 2021
1 parent 0766f44 commit 5990d60
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion WinQuickLook/Controls/PreviewHandlerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ public IPreviewHandler CreatePreviewHandler(string fileName)
// 初期化できない場合はアンロードする
previewHandler.Unload();
}
catch
{
// ignored
}
finally
{

Marshal.FinalReleaseComObject(previewHandler);
}

Expand All @@ -139,6 +142,10 @@ private void UnloadPreviewHandler()
{
_previewHandler.Unload();
}
catch
{
// ignored
}
finally
{
Marshal.FinalReleaseComObject(_previewHandler);
Expand Down

0 comments on commit 5990d60

Please sign in to comment.