Program "crashes" when I setResizable(true) and resize the Window

I’m pretty sure that’s not how draw() works

How do you think it works? Something has to provide the timing (default 60 frames/sec).