-
Notifications
You must be signed in to change notification settings - Fork 501
Evaluate throwing if Window is null on UWP #510
Comments
We should instead check if there IS a main window, and if there isn't we are already on the 'main' thread and can just execute on the current thread. |
GH-510: If there is no main window, then there is no UI thread
Do you want to do a PR? or do you want me to? |
I am failing to get the project running without errors on my machine :( |
No worries (We recommend VS 2017 as there is a regression on VS 2019 16.1 right now for the multi-targeting stuff we are using). I put in a PR #803 to fix it up. |
I think if the issue hasn't been fixed with your PR, as the |
@jamesmontemagno should I open a new issue regarding this problem? |
It should never throw as we always call IsMainThread and if CoreWindow is null then we return true so it should just fire. If you can open with a repro that would be good. Or send down a PR :) |
Opened a new issue here: #1020 |
Should we be throwing here?
Essentials/Xamarin.Essentials/MainThread/MainThread.uwp.cs
Line 16 in f56c8ba
The text was updated successfully, but these errors were encountered: