diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-10 02:52:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-10 02:52:31 +0300 |
commit | 51fa913783cce22eacb439c8d671c7aaa1647898 (patch) | |
tree | 59246b9a93dcd4776413392ab0765cae382c0cd5 /src/client.cpp | |
parent | 2317fbe9d29f5bea76a2ba05b40841b11de1a6f2 (diff) | |
download | ManaVerse-51fa913783cce22eacb439c8d671c7aaa1647898.tar.gz ManaVerse-51fa913783cce22eacb439c8d671c7aaa1647898.tar.bz2 ManaVerse-51fa913783cce22eacb439c8d671c7aaa1647898.tar.xz ManaVerse-51fa913783cce22eacb439c8d671c7aaa1647898.zip |
fix icon loading on windows.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 3f049340f..ae76813ab 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2991,7 +2991,10 @@ void Client::setIcon() #ifdef WIN32 static SDL_SysWMinfo pInfo; - SDL::getWindowWMInfo(mainGraphics->getWindow(), &pInfo); + if (mainGraphics) + SDL::getWindowWMInfo(mainGraphics->getWindow(), &pInfo); + else + SDL::getWindowWMInfo(nullptr, &pInfo); // Attempt to load icon from .ico file HICON icon = (HICON) LoadImage(nullptr, iconFile.c_str(), IMAGE_ICON, 64, 64, LR_LOADFROMFILE); |