From aa645019e9ca3c7c982ee24ab0c9e50a62bbca0d Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 12 Feb 1998 21:59:56 +0000 Subject: [PATCH] Incorporated code changes contributed by Charlie Hotchkiss --- XGL/xgl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/XGL/xgl.c b/XGL/xgl.c index 103bd57c..0763f39f 100644 --- a/XGL/xgl.c +++ b/XGL/xgl.c @@ -2772,8 +2772,13 @@ void xglutIdleFunc ( void (*func)(void) ) void xglutInit ( int* argcp, char** argv ) { + if(!xglTraceFd ) { // Not defined by any other means, must be here + xglTraceFd = stdout; // avoid a crash from a NULL ptr. + } if ( xglTraceIsEnabled("glutInit") ) - fprintf ( xglTraceFd, " /* glutInit ( (int *)0x%08x, (char **)0x%08x ) ; */\n" , argcp, argv ) ; + fprintf ( xglTraceFd, + " /* glutInit ( (int *)0x%08x, (char **)0x%08x ) ; */\n" , + argcp, argv ) ; if ( xglExecuteIsEnabled("glutInit") ) glutInit ( argcp, argv ) ; } -- 2.39.2