From 76ddc9324dd718d617971774c8957566b1ef8235 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Fri, 17 Nov 2017 13:56:43 +0300 Subject: [PATCH] Fix V3019 Possibly an incorrect variable is compared to null after type conversion using 'as' keyword. Check variables 'd', 'container'. Espera.View DragDropExtension.cs 89 --- Espera.View/DragDropExtension.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Espera.View/DragDropExtension.cs b/Espera.View/DragDropExtension.cs index 8ac6ee6a..6b6050a9 100644 --- a/Espera.View/DragDropExtension.cs +++ b/Espera.View/DragDropExtension.cs @@ -86,7 +86,7 @@ private static void HandleScrollOnDragDropChanged(DependencyObject d, Dependency { FrameworkElement container = d as FrameworkElement; - if (d == null) + if (container == null) { Debug.Fail("Invalid type!"); return; @@ -160,4 +160,4 @@ private static void Unsubscribe(FrameworkElement container) #endregion ScrollOnDragDropProperty } -} \ No newline at end of file +}