mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
src/appicon.c: updated paint_app_icon
moving scr initialization after WApplication existing test to prevent crashing in case wapp is null Acked-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
cad716b5ef
commit
aa1ee24fc0
@@ -197,15 +197,16 @@ void unpaint_app_icon(WApplication *wapp)
|
|||||||
void paint_app_icon(WApplication *wapp)
|
void paint_app_icon(WApplication *wapp)
|
||||||
{
|
{
|
||||||
WIcon *icon;
|
WIcon *icon;
|
||||||
WScreen *scr = wapp->main_window_desc->screen_ptr;
|
WScreen *scr;
|
||||||
WDock *attracting_dock;
|
WDock *attracting_dock;
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
Bool update_icon = False;
|
Bool update_icon = False;
|
||||||
|
|
||||||
if (!wapp || !wapp->app_icon)
|
if (!wapp || !wapp->app_icon || !wapp->main_window_desc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
icon = wapp->app_icon->icon;
|
icon = wapp->app_icon->icon;
|
||||||
|
scr = wapp->main_window_desc->screen_ptr;
|
||||||
wapp->app_icon->main_window = wapp->main_window;
|
wapp->app_icon->main_window = wapp->main_window;
|
||||||
|
|
||||||
/* If the icon is docked, don't continue */
|
/* If the icon is docked, don't continue */
|
||||||
|
|||||||
Reference in New Issue
Block a user