X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_structure.c;h=f0bc9a2a840abd69d78dbbaf15aabe3b832df5c8;hb=ba0b3e4f7c57925fea4b418356a283a3d8135f2d;hp=5a6ce95ae07f1d91fd073bb0f9aa124cfd85bca1;hpb=67f242b7dd68bea7dea467f9b5265c8448b6655e;p=freeglut diff --git a/src/fg_structure.c b/src/fg_structure.c index 5a6ce95..f0bc9a2 100644 --- a/src/fg_structure.c +++ b/src/fg_structure.c @@ -75,6 +75,11 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, /* Have the window object created */ SFG_Window *window = (SFG_Window *)calloc( 1, sizeof(SFG_Window) ); + if( !window ) + { + fgError( "Out of memory. Could not create window." ); + } + fgPlatformCreateWindow ( window ); fghClearCallBacks( window ); @@ -100,7 +105,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, /* * Open the window now. The fgOpenWindow() function is system - * dependant, and resides in fg_window.c. Uses fgState. + * dependent, and resides in fg_window.c. Uses fgState. */ fgOpenWindow( window, title, positionUse, x, y, sizeUse, w, h, gameMode, (GLboolean)(parent ? GL_TRUE : GL_FALSE) ); @@ -332,7 +337,7 @@ void fgDestroyMenu( SFG_Menu* menu ) * This function should be called on glutInit(). It will prepare the internal * structure of freeglut to be used in the application. The structure will be * destroyed using fgDestroyStructure() on glutMainLoop() return. In that - * case further use of freeglut should be preceeded with a glutInit() call. + * case further use of freeglut should be preceded with a glutInit() call. */ void fgCreateStructure( void ) {