Crash in SDL_SetRenderTarget_REAL

I recently modified my game so I use an offscreen texture for drawing shadows of objects to (so I don’t get a ‘double shadow’ effect). But there seems to be a very occasional crash, as reported by the PlayStore, in:

SDL_SetRenderTarget_REAL by a SIGSEGV

I know the renderer I pass to the SDL_SetRenderTarget is good and I test that the texture I send is non-null, and that texture is created with SDL_CreateTexture(m_pRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, sizeScreen.width, sizeScreen.height);

I’m using SDL2 2.0.16 and SDL2_image 2.0.5 so I guess I oughta update as any SDL bug maybe fixed, but am I doing anything obviously wrong?

I can’t see anything wrong on a quick glance. I use target textures heavily and haven’t noticed a similar problem, but then I’m still on SDL 2.0.10 (terrified of updating on Android and iOS because the build always breaks)!