Update of /cvsroot/freedroid/FreeDroid/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21510
Modified Files:
automap.c
Log Message:
* Fixed a segmentation fault bug in the automap code in conjunction with
non-open-gl mode.
Index: automap.c
===================================================================
RCS file: /cvsroot/freedroid/FreeDroid/src/automap.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** automap.c 31 May 2004 07:59:35 -0000 1.14
--- automap.c 3 Jun 2004 19:38:15 -0000 1.15
***************
*** 398,401 ****
--- 398,408 ----
static int first_call = TRUE;
+ //---------------------
+ // If there is no OpenGL graphics output, then there is also no need
+ // to update/edit any OpenGL textures, therefore we quit to prevent
+ // a segmentation fault.
+ //
+ if ( ! use_open_gl ) return;
+
if ( first_call )
{
***************
*** 491,494 ****
--- 498,510 ----
Level automap_level = curShip . AllLevels [ Me [ 0 ] . pos . z ] ;
+ //---------------------
+ // If there is no OpenGL graphics output, then there is also no need
+ // to update/edit any OpenGL textures, therefore we quit to prevent
+ // a segmentation fault.
+ //
+ if ( ! use_open_gl ) return;
+
+ set_up_texture_for_automap ( );
+
//--------------------
// At first, we only blit the known data about the pure wall-type
|