[UxTheme]
authorJames Tabor <james.tabor@reactos.org>
Wed, 16 Sep 2015 08:53:35 +0000 (08:53 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 16 Sep 2015 08:53:35 +0000 (08:53 +0000)
- Fix uninitialized local variable context, MSVC Build. See CORE-9225.

svn path=/trunk/; revision=69254

reactos/dll/win32/uxtheme/ncscrollbar.c

index 9b3527c..d3f3c8f 100644 (file)
@@ -399,14 +399,14 @@ SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
         return;
     }
 
         return;
     }
 
-    /* The scrollbar rect is in screen coordinates */
-    OffsetRect(&sbi.rcScrollBar, -context.wi.rcWindow.left, -context.wi.rcWindow.top);
-
     if ((SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
                  return;
     
     ThemeInitDrawContext(&context, hwnd, 0);
 
     if ((SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
                  return;
     
     ThemeInitDrawContext(&context, hwnd, 0);
 
+    /* The scrollbar rect is in screen coordinates */
+    OffsetRect(&sbi.rcScrollBar, -context.wi.rcWindow.left, -context.wi.rcWindow.top);
+
     hwndOwner = (nBar == SB_CTL) ? GetParent(hwnd) : hwnd;
     hwndCtl   = (nBar == SB_CTL) ? hwnd : 0;
 
     hwndOwner = (nBar == SB_CTL) ? GetParent(hwnd) : hwnd;
     hwndCtl   = (nBar == SB_CTL) ? hwnd : 0;