Check that window is initialized when setting fullscreen

This commit is contained in:
Charles Dang 2016-02-13 21:30:52 +11:00
parent bd8066313c
commit 8d6ca11241

View file

@ -1049,7 +1049,7 @@ bool CVideo::detect_video_settings(std::pair<int,int>& resolution, int& bpp, int
void CVideo::set_fullscreen(bool ison)
{
if (isFullScreen() != ison) {
if (window && isFullScreen() != ison) {
const std::pair<int,int>& res = preferences::resolution();
#if SDL_VERSION_ATLEAST(2, 0, 0)