diff --git a/Quake/pl_linux.c b/Quake/pl_linux.c index 73879bc8..b06eccb5 100644 --- a/Quake/pl_linux.c +++ b/Quake/pl_linux.c @@ -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)