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
Describe the bug
When an event occurs while no VideoStateOptions is set up for the current BlazoredVideo component, a System.NullReferenceException is thrown, caught, and logged in BlazoredVideo.OnChange on line 202.
This seems to be because videoData.State is null after being deserialized.
I would imagine the fix is to either always initialize the property in the VideoEventData constructor, or not attempt to set the videoData.State.Video property when videoData.State is null.
To Reproduce
Steps to reproduce the behavior:
Go to the file 'AllEventsAllOptions.razor' in the project 'SharedRCL' from your own samples.
Change the first line in OnInitialized to var allOptionsEnabled = new VideoStateOptions() { All = false };, setting All from true to false.
Open the devtools and look in console. There should be an System.NullReferenceException.
Expected behavior
I would expect it would not attempt to set a property on a null object or that the resulting NullReferenceException is not logged.
Screenshots
Hosting Model (is this issue happening with a certain hosting model?):
Blazor WebAssembly
The text was updated successfully, but these errors were encountered:
Describe the bug
When an event occurs while no
VideoStateOptions
is set up for the currentBlazoredVideo
component, aSystem.NullReferenceException
is thrown, caught, and logged inBlazoredVideo.OnChange
on line 202.This seems to be because
videoData.State
is null after being deserialized.I would imagine the fix is to either always initialize the property in the
VideoEventData
constructor, or not attempt to set thevideoData.State.Video
property whenvideoData.State
is null.To Reproduce
Steps to reproduce the behavior:
OnInitialized
tovar allOptionsEnabled = new VideoStateOptions() { All = false };
, settingAll
fromtrue
tofalse
.System.NullReferenceException
.Expected behavior
I would expect it would not attempt to set a property on a null object or that the resulting
NullReferenceException
is not logged.Screenshots
Hosting Model (is this issue happening with a certain hosting model?):
The text was updated successfully, but these errors were encountered: