From: Eric Kohl Date: Sun, 24 Aug 2008 18:30:59 +0000 (+0000) Subject: Don't try to print information about a service that doesn't exist. X-Git-Tag: backups/umode-network-branch@37897~387 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=0eaca617d3693b5b52f165ebe24aed4968b0d34c Don't try to print information about a service that doesn't exist. svn path=/trunk/; revision=35606 --- diff --git a/reactos/base/applications/sc/query.c b/reactos/base/applications/sc/query.c index 128c587b3af..e15573b92f9 100644 --- a/reactos/base/applications/sc/query.c +++ b/reactos/base/applications/sc/query.c @@ -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); } }