Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp	(revision 51923)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp	(revision 51924)
@@ -1511,4 +1511,7 @@
     if (RT_SUCCESS(rc))
     {
+        /* Assign service environment to our context. */
+        pCtx->pEnv = pEnv;
+
         /* Create the proxy window. At the moment we
          * only support one window at a time. */
@@ -1531,10 +1534,4 @@
     if (RT_SUCCESS(rc))
         rc = RTSemEventCreate(&pCtx->hEvtQueueSem);
-    if (RT_SUCCESS(rc))
-    {
-        /* Assign service environment to our context. */
-        gCtx.pEnv = pEnv;
-    }
-
     if (RT_SUCCESS(rc))
     {
