Or maybe I'm missing something, and people should simply be smart enough not to pass a NULL in the first place
Code: Select all
WandExport MagickBooleanType MagickSetImageFilename(MagickWand *wand,
const char *filename)
{
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
if (filename != (const char *) NULL)
(void) CopyMagickString(wand->images->filename,filename,MagickPathExtent);
return(MagickTrue);
}