From: dirk Date: Sun, 26 Jun 2016 09:02:34 +0000 (+0200) Subject: Proper fix... X-Git-Tag: 7.0.2-2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a4f6588c5cc63a7a96cf3465f9eb8e73c76a2e9;p=imagemagick Proper fix... --- diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index 8ab1116c7..160897622 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -1380,16 +1380,18 @@ MagickPrivate int NTGhostscriptEXE(char *path,int length) if (*program == '\0') { if (NTGhostscriptGetString("GS_DLL",&is_64_bit_version,program, - sizeof(program)) != FALSE) + sizeof(program)) == FALSE) { - p=strrchr(program,'\\'); - if (p != (char *) NULL) - { - p++; - *p='\0'; - (void) ConcatenateMagickString(program,is_64_bit_version ? - "gswin64c.exe" : "gswin32c.exe",sizeof(program)); - } + UnlockSemaphoreInfo(ghost_semaphore); + return(FALSE); + } + p=strrchr(program,'\\'); + if (p != (char *) NULL) + { + p++; + *p='\0'; + (void) ConcatenateMagickString(program,is_64_bit_version ? + "gswin64c.exe" : "gswin32c.exe",sizeof(program)); } } UnlockSemaphoreInfo(ghost_semaphore);