Skip to content

Commit

Permalink
Add support for runtimes without built-in COM interop
Browse files Browse the repository at this point in the history
  • Loading branch information
kekekeks committed Oct 26, 2023
1 parent fedfb2f commit 6665a3a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ICSharpCode.AvalonEdit/Editing/ImeNativeWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ public static ITfThreadMgr GetTextFrameworkThreadManager()
{
if (!textFrameworkThreadMgrInitialized) {
textFrameworkThreadMgrInitialized = true;
TF_CreateThreadMgr(out textFrameworkThreadMgr);
try
{
TF_CreateThreadMgr(out textFrameworkThreadMgr);
}
catch
{
// The call will fail if the current runtime doesn't have COM interop
}
}
return textFrameworkThreadMgr;
}
Expand Down

0 comments on commit 6665a3a

Please sign in to comment.