Update ScrollViewRenderer.cs (#6151) (#7133)
authorShane Neuville <shneuvil@microsoft.com>
Tue, 13 Aug 2019 06:41:09 +0000 (00:41 -0600)
committerGerald Versluis <gerald.versluis@microsoft.com>
Tue, 13 Aug 2019 06:41:09 +0000 (08:41 +0200)
Xamarin.Forms.Platform.Android/Renderers/ScrollViewRenderer.cs

index 0d9cdbd..2779f75 100644 (file)
@@ -373,6 +373,10 @@ namespace Xamarin.Forms.Platform.Android
                        while (IsLayoutRequested)
                        {
                                await Task.Delay(TimeSpan.FromMilliseconds(1));
+                               
+                               if (_disposed)
+                       return;
+                               
                                cycle++;
 
                                if (cycle >= 10)
@@ -533,4 +537,4 @@ namespace Xamarin.Forms.Platform.Android
 
                bool IScrollView.ScrollBarsInitialized { get; set; } = false;
        }
-}
\ No newline at end of file
+}