mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-23 00:30:45 +02:00
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.
This commit is contained in:
parent
523fe64ba1
commit
fab1d37ecb
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue