diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 84ef9c4a4..2fcb741db 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1391,15 +1391,23 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, * by fbScreenInit with our own. */ - free(pScreen -> visuals); + for (int i = 0; i < pScreen->numDepths; i++) + { + #ifdef DEBUG + fprintf(stderr, "%s: depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); + #endif + free(pScreen->allowedDepths[i].vids); + } + free(pScreen -> allowedDepths); + pScreen -> allowedDepths = depths; + pScreen -> numDepths = numDepths; + pScreen -> rootDepth = rootDepth; + free(pScreen -> visuals); pScreen -> visuals = visuals; - pScreen -> allowedDepths = depths; pScreen -> numVisuals = numVisuals; - pScreen -> numDepths = numDepths; pScreen -> rootVisual = defaultVisual; - pScreen -> rootDepth = rootDepth; /* * Set up the internal structures used for |