From 2008ec466979a6f6b73d92a301e97911b2876d74 Mon Sep 17 00:00:00 2001 From: fedor Date: Tue, 29 Oct 2002 22:01:06 +0000 Subject: [PATCH] Make sure not to dereference a possible NULL pointer. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14871 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/x11/XGServerWindow.m | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d284cdb..b5734d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-29 Adam Fedor + + * Source/x11/XGServerWindow.m ([XGServer -_checkWindowManager]): + Make sure not to dereference possible NULL pointer. + 2002-10-28 Adam Fedor * Source/gsc/GSStreamContext.m (-DPSsetalpha:): Use GSsetalpha diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index bc5dd71..65b0086 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -497,7 +497,7 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number, XA_CARDINAL, 32, -1, &count); // If the two are not identical, the flag on the root window, was // a left over from an old window manager. - if (*win1 == *win) + if (win1 && *win1 == *win) { wmflags |= XGWM_GNOME; @@ -519,7 +519,7 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number, XA_WINDOW, 32, -1, &count); // If the two are not identical, the flag on the root window, was // a left over from an old window manager. - if (*win1 == *win) + if (win1 && *win1 == *win) { wmflags |= XGWM_EWMH;