/* 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 );
/*
* 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) );
* 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 )
{