diff --git a/src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs b/src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs
index 8723304f8f..d2a35bb6aa 100644
--- a/src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs
+++ b/src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs
@@ -151,7 +151,11 @@ namespace Avalonia.Controls
_content.Loaded += (s, e) =>
{
var composition = ElementComposition.GetElementVisual(_content);
- var compositor = composition!.Compositor;
+
+ if(composition == null)
+ return;
+
+ var compositor = composition.Compositor;
composition.Opacity = 0;
var smoothRotationAnimation
diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs
index c0265e28b9..ff241dce7a 100644
--- a/src/Avalonia.Controls/TopLevel.cs
+++ b/src/Avalonia.Controls/TopLevel.cs
@@ -318,7 +318,7 @@ namespace Avalonia.Controls
///
/// Occurs when physical Back Button is pressed or a back navigation has been requested.
///
- public event EventHandler BackRequested
+ public event EventHandler BackRequested
{
add { AddHandler(BackRequestedEvent, value); }
remove { RemoveHandler(BackRequestedEvent, value); }
diff --git a/src/iOS/Avalonia.iOS/TextInputResponder.cs b/src/iOS/Avalonia.iOS/TextInputResponder.cs
index d5723d78f7..8862f4e392 100644
--- a/src/iOS/Avalonia.iOS/TextInputResponder.cs
+++ b/src/iOS/Avalonia.iOS/TextInputResponder.cs
@@ -445,7 +445,7 @@ partial class AvaloniaView
UITextPosition IUITextInput.BeginningOfDocument => _beginningOfDocument;
- private int DocumentLength => _client.SurroundingText.Text.Length + (_markedText?.Length ?? 0);
+ private int DocumentLength => (_client.SurroundingText.Text?.Length ?? 0) + (_markedText?.Length ?? 0);
UITextPosition IUITextInput.EndOfDocument => new AvaloniaTextPosition(DocumentLength);
UITextRange IUITextInput.MarkedTextRange