Skip to content

Commit 6665a3a

Browse files
committed
Add support for runtimes without built-in COM interop
1 parent fedfb2f commit 6665a3a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ICSharpCode.AvalonEdit/Editing/ImeNativeWrapper.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,14 @@ public static ITfThreadMgr GetTextFrameworkThreadManager()
116116
{
117117
if (!textFrameworkThreadMgrInitialized) {
118118
textFrameworkThreadMgrInitialized = true;
119-
TF_CreateThreadMgr(out textFrameworkThreadMgr);
119+
try
120+
{
121+
TF_CreateThreadMgr(out textFrameworkThreadMgr);
122+
}
123+
catch
124+
{
125+
// The call will fail if the current runtime doesn't have COM interop
126+
}
120127
}
121128
return textFrameworkThreadMgr;
122129
}

0 commit comments

Comments
 (0)