diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index c8fcd6220..0b4336900 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -156,6 +156,9 @@ GetScreenPrime(ScreenPtr master, int prime_id) DRI2ScreenPtr ds; ds = DRI2GetScreen(slave); + if (ds == NULL) + continue; + if (ds->prime_id == prime_id) return slave; }