summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-09-09 19:12:35 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-09-09 19:13:56 +0930
commit5d3a47eed9f5330982d10c3acc15c486e3c86beb (patch)
treea02e7d545d7849a5bec57b953608fd328344e427
parent53772f5c98b0ad8c0b7de14ee147c0b3faf77ca2 (diff)
Don't crash when neither Path nor Device are given.
xf86ReplaceOption doesn't seem to like NULL values
-rw-r--r--src/synaptics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 3e55538..8475d1a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -176,7 +176,8 @@ SetDeviceAndProtocol(LocalDevicePtr local)
device = xf86FindOptionValue(local->options, "Device");
if (!device) {
device = xf86FindOptionValue(local->options, "Path");
- xf86ReplaceStrOption(local->options, "Device", device);
+ if (device)
+ xf86ReplaceStrOption(local->options, "Device", device);
}
if (device && strstr(device, "/dev/input/event")) {
#ifdef BUILD_EVENTCOMM