From 79f571aaa6db266eac8d36e3b25b87cdce6b2630 Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Sat, 17 Aug 2024 07:54:24 -0400 Subject: [PATCH] Fix: unsafe operation while getting a overlay entry in text selection --- lib/src/editor/widgets/text/text_selection.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/editor/widgets/text/text_selection.dart b/lib/src/editor/widgets/text/text_selection.dart index 3e83d00e..f57038cf 100644 --- a/lib/src/editor/widgets/text/text_selection.dart +++ b/lib/src/editor/widgets/text/text_selection.dart @@ -428,12 +428,12 @@ class EditorTextSelectionOverlay { ); if (builtMagnifier == null) return; - + _magnifierController.show( context: context, below: magnifierConfiguration.shouldDisplayHandlesInMagnifier ? null - : _handles![0], + : _handles?.elementAtOrNull(0), builder: (_) => builtMagnifier, ); }