* cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path

doesn't find the app on the path.
This commit is contained in:
Christopher Faylor 2009-05-04 18:51:08 +00:00
parent 143cb0bed5
commit 3227665e19
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
* cygcheck.cc (find_app_on_path): Avoid using NULL pointer if
find_on_path doesn't find the app on the path.
2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
* Makefile.in: Add DESTDIR functionality.

View File

@ -840,6 +840,9 @@ find_app_on_path (const char *app, bool showall = false)
{
const char *papp = find_on_path (app, ".exe", showall, false, true);
if (!papp)
return NULL;
wide_path wpath (papp);
HANDLE fh =
CreateFileW (wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,