File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,22 @@ XRECORE_API void ELogCallback(void* context, pcstr message)
5656
5757 if (windowLog)
5858 {
59+
5960 if (isDialog)
6061 {
6162 auto d = gcnew WindowLog::AddMessageDelegate (windowLog, &WindowLog::AddDialogMessage);
62- windowLog->Invoke (d, gcnew array<Object^> { (int )type, gcnew String (message) });
63+ if (windowLog->InvokeRequired )
64+ windowLog->BeginInvoke (d, gcnew array<Object^> { (int )type, gcnew String (message) });
65+ else
66+ d (type, gcnew String (message));;
6367 }
6468 else
6569 {
6670 auto d = gcnew WindowLog::AddMessageDelegate (windowLog, &WindowLog::AddMessage);
67- windowLog->Invoke (d, gcnew array<Object^> { (int )type, gcnew String (message) });
71+ if (windowLog->InvokeRequired )
72+ windowLog->BeginInvoke (d, gcnew array<Object^> { (int )type, gcnew String (message) });
73+ else
74+ d (type, gcnew String (message));
6875 }
6976 }
7077}
You can’t perform that action at this time.
0 commit comments