SDL_CreateWindow with multithread, it crashed

SDL_CreateWindow is in the thread, when multithread created, app is creashed

From this page http://wiki.libsdl.org/CategoryThread:

{i} NOTE : You should not expect to be able to create a window, render, or receive events on any thread other than the main one. For platform-specific exceptions or complicated options ask on the forums/mailing list.