There's a path in getWheelButtons() where fakeKey is not set. Check for
that.

Reported-by: Ping Cheng <pingli...@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/wcmCommon.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 866e877..21a608a 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -445,16 +445,16 @@ static void sendWheelStripEvents(InputInfoPtr pInfo, 
const WacomDeviceState* ds,
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
        int fakeButton = 0, naxes = priv->naxes;
-       unsigned int *fakeKey;
+       unsigned int *fakeKey = NULL;
 
        DBG(10, priv, "\n");
 
        fakeButton = getWheelButton(pInfo, ds, &fakeKey);
 
-       if (!fakeButton && !(*fakeKey))
+       if (!fakeButton && (!fakeKey || !(*fakeKey)))
                return;
 
-       if (!(*fakeKey))
+       if (!fakeKey || !(*fakeKey))
        {
                /* send both button on/off in the same event for pad */ 
                xf86PostButtonEvent(pInfo->dev, is_absolute(pInfo), fakeButton 
& AC_CODE,
-- 
1.7.3.2


------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to