diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-23 02:57:00 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-23 02:57:00 +0300 |
commit | fab1d37ecbeee9777ad1485b0cc62b55042d5014 (patch) | |
tree | aaf62fa50aecfea83bafc309d09116ecefce8e72 /hw/xfree86 | |
parent | 523fe64ba16cf7a40f4095432d81300726d83e8d (diff) |
xfree86/options: don't blindly dereference NULL pointers
Sure, conf_idev should be initialised, but if it's not, try to make the
best of a bad situation.
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/common/xf86Option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c index 0a4c11d8d..7afb63a4d 100644 --- a/hw/xfree86/common/xf86Option.c +++ b/hw/xfree86/common/xf86Option.c @@ -142,14 +142,14 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, if (defaultOpts) { pInfo->options = xf86OptionListCreate(defaultOpts, -1, 0); } - if (pInfo->conf_idev->commonOptions) { + if (pInfo->conf_idev && pInfo->conf_idev->commonOptions) { tmp = xf86optionListDup(pInfo->conf_idev->commonOptions); if (pInfo->options) pInfo->options = xf86optionListMerge(pInfo->options, tmp); else pInfo->options = tmp; } - if (pInfo->conf_idev->extraOptions) { + if (pInfo->conf_idev && pInfo->conf_idev->extraOptions) { tmp = xf86optionListDup(pInfo->conf_idev->extraOptions); if (pInfo->options) pInfo->options = xf86optionListMerge(pInfo->options, tmp); |