mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-15 04:39:07 +00:00
Show office exception instead of crash
This commit is contained in:
@@ -102,9 +102,7 @@ public class PreviewHandlerHost : Control
|
||||
CurrentPreviewHandler = guid;
|
||||
var o = Activator.CreateInstance(Type.GetTypeFromCLSID(CurrentPreviewHandler, true));
|
||||
|
||||
var fileInit = o as IInitializeWithFile;
|
||||
|
||||
if (fileInit == null)
|
||||
if (o is not IInitializeWithFile fileInit)
|
||||
return false;
|
||||
|
||||
fileInit.Initialize(path, 0);
|
||||
|
Reference in New Issue
Block a user