[SDL 2] Freeze when closing the window

Hi everyone.

I’m getting a big freeze when closing the window!

if (event.window.type == SDL_WINDOWEVENT_CLOSE)

But this code works :

if (event.type == SDL_QUIT)

My OS is ubuntu 14.4 LTS.

Erf c’est event.window.event et non window.event.type…, bref, je code du tutoriel que j’ai trouve n’etait pas bon…