I'm writing a text rendering routine that renders text from a string buffer to a sprite texture as part of a custom implementation of sdl2.ext.System:
Unfortunately, on my system (Mac OS X 10.11.6), I consistently get the following exception sometimes when using either SDL_CreateTexture (in Sprite.create()) or SDL_CreateTextureFromSurface (in main()).
Traceback (most recent call last): File "mwe.py", line 207, in <module> main() File "mwe.py", line 180, in main sprite = Sprite.create((0, 0), (100, 100), renderer=renderer) File "mwe.py", line 138, in create texture=tex.contents ValueError: NULL pointer access
I feel that I'm doing something wrong, but I cannot figure out the problem. I would be very grateful for your help!