background=loadImage(filename);
I also found out that the loadImage function was returning the image surface as it was supposed to, and that the address of background was 0x00000014 (as stated in the error). As I stated above, I also figured out that I couldn't even set background to NULL.
So basically, my question is: What could be causing me to not be able to write any data to background?