summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Ros <enrico.ros@gmail.com>2009-12-10 02:27:51 +0100
committerEnrico Ros <enrico.ros@gmail.com>2009-12-10 02:29:26 +0100
commit21526f944f5f7731ce6a661796571c0dfbe802e7 (patch)
treec2f1d17d08d803ccb0eb9eb52fdc9e319cf01df8
parent3149204e553de56f2d9b47990878ff17a3e0f8a4 (diff)
Don't crash if model-specific functions are not defined.
If the kernel supports a newer device, not handled by this driver, avoid crashing the X server. Signed-off-by: Enrico Ros <enrico.ros@gmail.com>
-rw-r--r--src/wcmUSB.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 5614f89..5e8abfb 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -522,7 +522,9 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version)
common->wcmResolY = WacomModelDesc [i].yRes;
}
- if (strstr(common->wcmModel->name, "TabletPC"))
+ if (!common->wcmModel)
+ xf86Msg(X_ERROR, "this model is not supported\n");
+ else if (strstr(common->wcmModel->name, "TabletPC"))
{
if (common->tablet_id != 0x90)
{