diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-20 21:48:32 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-20 21:48:32 +0300 |
| commit | 26ede873b194b0df70979b6f1b62e0c91ca19341 (patch) | |
| tree | 5b473cf20793ef1c89325fa8e04183843aefac7e /Software/Visual_Studio/Tango.Core | |
| parent | 09eabd45ecf65d6f900b9d53428e7576bdc4d825 (diff) | |
| download | Tango-26ede873b194b0df70979b6f1b62e0c91ca19341.tar.gz Tango-26ede873b194b0df70979b6f1b62e0c91ca19341.zip | |
Working on PPC performance...
Diffstat (limited to 'Software/Visual_Studio/Tango.Core')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/ExtendedObject.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs index 44663b503..acead4157 100644 --- a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs +++ b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs @@ -109,7 +109,14 @@ namespace Tango.Core /// <param name="action">The action.</param> protected virtual void InvokeUI(Action action) { - Application.Current.Dispatcher.BeginInvoke(action); + if (Application.Current != null) + { + Application.Current.Dispatcher.BeginInvoke(action); + } + else + { + action(); + } } /// <summary> |
