diff options
-rw-r--r-- | src/wcmCommon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 0f041e3..35c302e 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -1455,9 +1455,10 @@ WacomCommonPtr wcmNewCommon(void) { WacomCommonPtr common; common = calloc(1, sizeof(WacomCommonRec)); - if (common) - common->refcnt = 1; + if (!common) + return NULL;; + common->refcnt = 1; common->wcmFlags = 0; /* various flags */ common->wcmProtocolLevel = WCM_PROTOCOL_4; /* protocol level */ common->wcmTPCButton = 0; /* set Tablet PC button on/off */ |