Hotfix: Segfault on Error

Applied hotfix that prevents segfaults on window resize events