The problem is that you call SDL_Quit() when escape is pressed. Then your loop
Code:
while(m_Running)
{
while(SDL_PollEvent(&event))
{
OnEvent(&event);
}
OnLoop();
glClear(GL_COLOR_BUFFER_BIT);
OnRender();
SDL_GL_SwapBuffers();
}
goes on to execute SDL functions (i.e. SDL_GL_SwapBuffers()), which won't work after you've called SDL_Quit().
So, here's what I suggest you do. Instead of calling SDL_Quit(), use
I'd then follow your logic to make sure SDL_Quit() is called eventually.
I compiled and ran your project under Linux with no troubles, in case you're interested about portability.
BTW, please put a default case where you switch on an SDLKey -- with warnings enabled, you get hundreds of warnings about unhandled enumeration values . . . .