The problem is more serious

because SDL_RegisterApp() is defined in the library that
is supposed to be loaded by SDL_Init().

So the bug is somehow in the fact that SDL_Init()
(in the situation I described earlier) uses the
SDL_Instance, that cannot possibly be set when
it is called.

I am not familliar enough with SDL to fix the internal
gut os SDL_Init().

Do you have an idea of what to do to fix the problem ?