Error in SDL_FreeBlitMap

I’ve been trying to update to the latest SDL2 version (2.04) and after getting it to build I’m getting an error in the SDL_FreeBlitMap function on the bold line below:

SDL_FreeBlitMap(SDL_BlitMap * map)
if (map) {

It goes to this function and happens on this line.

dlfree(void *mem)

unlink_chunk(fm, next, nsize);

Here is how I call the SDL function and what is in my loaded image. Looks like everything is loading normally but SDL is having trouble freeing it.
[Image: ]

I get this error:

Exception thrown: read access violation.

H was 0x275835D4.

If there is a handler for this exception, the program may be safely continued.

Any idea what could be wrong?

I am having exactly the same problem. Did you ever find a solution?

One more piece of information: I’ve tried the same source code in Mac OS, Debian and Windows 7, and the problem only occurs on Windows.