aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index a30eac589..367c15841 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -3659,6 +3659,14 @@ void nxagentAddStaticResizedWindow(WindowPtr pWin, unsigned long sequence, int o
StaticResizedWindowStruct *tmp = nxagentStaticResizedWindowList;
nxagentStaticResizedWindowList = malloc(sizeof(StaticResizedWindowStruct));
+ if (!nxagentStaticResizedWindowList)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "WARNING: could not allocate memory for nxagentStaticResizedWindowList\n");
+ #endif
+ nxagentStaticResizedWindowList = tmp;
+ return;
+ }
nxagentStaticResizedWindowList -> next = tmp;
nxagentStaticResizedWindowList -> prev = NULL;