pl_linux.c: Set icon only if mask creation is successful.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@682 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2012-05-30 18:31:41 +00:00
parent 66adde7474
commit 2a36ecd51b

View file

@ -86,10 +86,13 @@ void PL_SetWindowIcon (void)
if (icon == NULL)
return;
mask = PL_CreateIconMask(icon);
if (mask != NULL)
{
SDL_WM_SetIcon(icon, mask);
SDL_FreeSurface(icon);
free(mask);
}
SDL_FreeSurface(icon);
}
void PL_VID_Shutdown (void)
{