protect function "Sdlimage.load_png_rw" against segfaults