In SDL when using the same SDL_Image , when loading, even if the url not correct, no errors occur. Tell me, please, how to check whether the picture has loaded?

    1 answer 1

    Judging by the dock, it suffices to check that IMG_Load returned a non-zero pointer:

    NULL is returned for errors, or a file reading error.

    • You can also add error output: if(texture) cout << SDL_GetError() << end; - user26699