You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you attempt calling SmartCardReader reader = await CardReader.FindAsync() and no card reader is connected, you will get "System.NullReferenceException: Object reference not set to an instance of an object.", because it attempts to await null. It should either return Task.FromResult(null), or be rewritten so it's actually async.
The workaround I had to use is SmartCardReader reader = CardReader.FindAsync()?.Result;
The text was updated successfully, but these errors were encountered:
If you attempt calling
SmartCardReader reader = await CardReader.FindAsync()
and no card reader is connected, you will get "System.NullReferenceException: Object reference not set to an instance of an object.", because it attempts to await null. It should either return Task.FromResult(null), or be rewritten so it's actually async.The workaround I had to use is
SmartCardReader reader = CardReader.FindAsync()?.Result;
The text was updated successfully, but these errors were encountered: