mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
wmaker: superfluous.c possible null pointer dereference
As reported by cppcheck: [src/superfluous.c:238] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null. [src/superfluous.c:239] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null. [src/superfluous.c:240] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null. The patch is adding a test to check if variable aicon exists.
This commit is contained in:
committed by
Carlos R. Mafra
parent
f5cb2f3d1c
commit
8d731b719e
@@ -195,8 +195,11 @@ static void doAppBounce(void *arg)
|
|||||||
AppBouncerData *data = (AppBouncerData*)arg;
|
AppBouncerData *data = (AppBouncerData*)arg;
|
||||||
WAppIcon *aicon = data->wapp->app_icon;
|
WAppIcon *aicon = data->wapp->app_icon;
|
||||||
|
|
||||||
|
if (!aicon)
|
||||||
|
return;
|
||||||
|
|
||||||
reinit:
|
reinit:
|
||||||
if (aicon && data->wapp->refcount > 1) {
|
if (data->wapp->refcount > 1) {
|
||||||
if (wPreferences.raise_appicons_when_bouncing)
|
if (wPreferences.raise_appicons_when_bouncing)
|
||||||
XRaiseWindow(dpy, aicon->icon->core->window);
|
XRaiseWindow(dpy, aicon->icon->core->window);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user