Skip to content

Commit

Permalink
NULL color name is acceptable
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed May 18, 2021
1 parent ee47890 commit b72dbd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions MagickCore/color.c
Expand Up @@ -2286,11 +2286,10 @@ MagickExport MagickBooleanType QueryColorCompliance(const char *name,
/*
Initialize color return value.
*/
assert(name != (const char *) NULL);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",name);
assert(color != (PixelInfo *) NULL);
if ((name == (char *) NULL) || (*name == '\0'))
name=BackgroundColor;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",name);
while (isspace((int) ((unsigned char) *name)) != 0)
name++;
GetPixelInfo((Image *) NULL,color);
Expand Down

0 comments on commit b72dbd1

Please sign in to comment.