From 679e603ffca84a3af2ee3ebd9661df228bb3df0e Mon Sep 17 00:00:00 2001 From: fayjf Date: Fri, 10 Jun 2011 03:53:12 +0000 Subject: [PATCH] Fixing a null argument to 'strdup' per e-mail from Eero Pajarre dated 6/8/2011 4:15 AM git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@926 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/freeglut/src/freeglut_init.c b/freeglut/freeglut/src/freeglut_init.c index cdb9e66..57bb020 100644 --- a/freeglut/freeglut/src/freeglut_init.c +++ b/freeglut/freeglut/src/freeglut_init.c @@ -314,7 +314,7 @@ static void fghInitialize( const char* displayName ) /* What we need to do is to initialize the fgDisplay global structure here. */ fgDisplay.Instance = GetModuleHandle( NULL ); - fgDisplay.DisplayName=strdup(displayName); + fgDisplay.DisplayName= displayName ? strdup(displayName) : 0 ; atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc ); if( atom == 0 )