treewide: use helper dixGetScreenPtr() for retrieving ScreenPtr's

Instead of directly accessing the global screenInfo.screens[] array,
let everybody go through a little inline helper. This one also checks
for array bounds - if the screen doesn't exist, return NULL.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-11 09:53:01 +02:00
committed by Enrico Weigelt
parent d2fcf85214
commit 0fbb681fce
17 changed files with 168 additions and 123 deletions

View File

@@ -369,7 +369,7 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth)
bail:
while (i--) {
ScreenPtr walkScreen = screenInfo.screens[i];
ScreenPtr walkScreen = dixGetScreenPtr(i);
PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen);
if (ps)
ps->UnrealizeGlyph(walkScreen, glyph);