fixes #590, prevents crash on resize while raining

fix crash on window size decrease