summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/common/xf86Bus.c')
-rw-r--r--hw/xfree86/common/xf86Bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 8382d911a..0d732d0b1 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -428,6 +428,9 @@ xf86GetEntityInfo(int entityIndex)
EntityInfoPtr pEnt;
int i;
+ if (entityIndex == -1)
+ return NULL;
+
if (entityIndex >= xf86NumEntities)
return NULL;