Here is the critical code:
…
path_map_iterator=MagickMapAllocateIterator(path_map); //880
while(MagickMapIterateNext(path_map_iterator,&key)) //882
{
const char
*path;
…
MagickMapAllocateIterator(…) may return NULL,the “path_map_iterator” was passed to MagickMapIterateNext.
in MagickMapIterateNext:
…
MagickExport unsigned int
MagickMapIterateNext(MagickMapIterator iterator,const char **key)
{
assert(iterator != 0); //868
assert(iterator->signature == MagickSignature);
assert(key != 0);
…
If iterator is NULL,the assertion "assert(iterator !=0)" will failed.
Credit: ADLab of Venustech
This problem is fixed by Mercurial changeset 15207:9ef81753e40a. Thanks for the report!