Thanks
I even solved it more elegantly with SDL_memcpy
.
I suspect that I even had a memory leak with the direct assignment. The pixels that were created with SDL_CreateSurface(...)
were then somewhere in the memory grave.
SDL_memcpy(SrcSurface->pixels, &pixels, sizeof(pixels));