http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver] / hacks / glx / polyhedra.c
index c69f3540c4f60deb7c22c924b917d7d6441917b3..7fa22b5c5ae1a76828189d32e256422e9ffd8377 100644 (file)
@@ -92,22 +92,22 @@ extern const char *progname;
 
 #define Malloc(lvalue,n,type) do {\
        if (!(lvalue = (type*) calloc((n), sizeof(type)))) \
-           Err("out of memory");\
+           abort();\
     } while(0)
 
 #define Realloc(lvalue,n,type) do {\
        if (!(lvalue = (type*) realloc(lvalue, (n) * sizeof(type)))) \
-           Err("out of memory");\
+           abort();\
     } while(0)
 
 #define Calloc(lvalue,n,type) do {\
        if (!(lvalue = (type*) calloc(n, sizeof(type))))\
-           Err("out of memory");\
+           abort();\
     } while(0)
 
 #define Matalloc(lvalue,n,m,type) do {\
        if (!(lvalue = (type**) matalloc(n, (m) * sizeof(type))))\
-           Err("out of memory");\
+           abort();\
     } while(0)
 
 #define Sprintfrac(lvalue,x) do {\
@@ -2263,7 +2263,7 @@ construct_polyhedron (Polyhedron *P, Vector *v, int V, Vector *f, int F,
         facelets++;
 
       } else if (P->even != -1) {
-        if (hit[i]) {
+        if (hit && hit[i]) {
           push_face3 (result, P->incid[3][i], P->incid[0][i],  ii);
           push_face3 (result, P->incid[1][i], P->incid[2][i],  ii);
         } else {