Skip to content

Commit

Permalink
fix: Fix possible null ref
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Jan 31, 2025
1 parent 245b355 commit 605715a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,13 @@ select handler.Value

// Iterate through the visual tree and either invoke ElementUpdate,
// or replace the element with a new one
foreach (var (element, elementHandlers, elementMappedType) in instancesToUpdate)
foreach (var (element, elementHandlers, elementMappedType) in instancesToUpdate.Where(x => x))

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot implicitly convert type '(Microsoft.UI.Xaml.FrameworkElement fe, System.Collections.Immutable.ImmutableArray<Uno.UI.RemoteControl.HotReload.MetadataUpdater.ElementUpdateAgent.ElementUpdateHandlerActions>, System.Type)' to 'bool'

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'element'.

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'elementHandlers'.

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'elementMappedType'.

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot implicitly convert type '(Microsoft.UI.Xaml.FrameworkElement fe, System.Collections.Immutable.ImmutableArray<Uno.UI.RemoteControl.HotReload.MetadataUpdater.ElementUpdateAgent.ElementUpdateHandlerActions>, System.Type)' to 'bool'

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'element'.

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'elementHandlers'.

Check failure on line 209 in src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot infer the type of implicitly-typed deconstruction variable 'elementMappedType'.
{
if (elementHandlers.IsDefaultOrEmpty)
{
continue;
}

// Action: ElementUpdate
// This is invoked for each existing element that is in the tree that needs to be replaced
foreach (var elementHandler in elementHandlers)
Expand Down

0 comments on commit 605715a

Please sign in to comment.