]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/pm_obj.c
Fix compile on MSYS2
[xonotic/netradiant.git] / libs / picomodel / pm_obj.c
index a089f5f44c1be4dbd1b493f84b23638aa7a631fd..24f3ee8ac6ad7cc3e23046c377d586a70b4288cc 100644 (file)
 
    ----------------------------------------------------------------------------- */
 
-
-
-/* marker */
-#define PM_OBJ_C
-
 /* dependencies */
 #include "picointernal.h"
+#include "globaldefs.h"
 
 /* disable warnings */
-#ifdef WIN32
+#if GDEF_COMPILER_MSVC
 #pragma warning( disable:4100 )                /* unref param */
 #endif
 
@@ -135,7 +131,7 @@ static int _obj_canload( PM_PARAMS_CANLOAD ){
  *   allocates - and reallocates as soon as required -
  *   my vertex data array in even steps.
  */
-#define SIZE_OBJ_STEP  4096
+const int SIZE_OBJ_STEP = 4096;
 
 static TObjVertexData *SizeObjVertexData(
        TObjVertexData *vertexData, int reqEntries,
@@ -676,7 +672,7 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){
 #endif
                        }
 
-                       if ( curFace == 0 ) {
+                       if ( curFace == 0 && curSurface != NULL ) {
                                PicoSetSurfaceName( curSurface,groupName );
                        }
                        else