Don't try to print information about a service that doesn't exist.
authorEric Kohl <eric.kohl@reactos.org>
Sun, 24 Aug 2008 18:30:59 +0000 (18:30 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 24 Aug 2008 18:30:59 +0000 (18:30 +0000)
svn path=/trunk/; revision=35606

reactos/base/applications/sc/query.c

index 128c587..e15573b 100644 (file)
@@ -227,17 +227,11 @@ Query(LPCTSTR *ServiceArgs,
         LPCTSTR ServiceName = *ServiceArgs;
 
         pStatus = QueryService(ServiceName);
-        if (bExtended)
+        if (pStatus)
         {
             PrintService(ServiceName,
                          pStatus,
-                         TRUE);
-        }
-        else
-        {
-            PrintService(ServiceName,
-                         pStatus,
-                         FALSE);
+                         bExtended);
         }
     }