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
1 changed files with 5 additions and 2 deletions

View File

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