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

the program is crashing so the draw method is not able to be called