mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
pl_linux.c: Set icon only if mask creation is successful.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@682 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
efda62fd3a
commit
476bdea0c1
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue