(234) Fixed part of bug #926883 (Video mode matching code, memory leaks,
[freeglut] / src / freeglut_ext.c
index 04b3b6e..ff13adc 100644 (file)
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #define GLX_GLXEXT_PROTOTYPES
-
 #include <GL/freeglut.h>
 #include "freeglut_internal.h"
 
-
 struct name_address_pair
 {
     const char *name;
@@ -190,6 +184,7 @@ void *FGAPIENTRY glutGetProcAddress( const char *procName )
 {
     /* Try GLUT functions first */
     int i;
+    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetProcAddress" );
     for( i = 0; glut_functions[ i ].name; i++ )
         if( strcmp( glut_functions[ i ].name, procName ) == 0)
             return glut_functions[ i ].address;