Skip to content

Commit

Permalink
Merge pull request #414 from kekekeks/fixes/no-com-support
Browse files Browse the repository at this point in the history
Add support for runtimes without built-in COM interop
  • Loading branch information
christophwille authored Oct 28, 2023
2 parents fedfb2f + 6665a3a commit 5928324
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 5928324

Please sign in to comment.