]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
sys: improve error and crash handling
[xonotic/darkplaces.git] / gl_rmain.c
index ec88c18736f00ecda75e1cc3087de9a2d9cd78ac..cb77104b063eacf27d2667955ecdd8fbe0c683b6 100644 (file)
@@ -3733,7 +3733,7 @@ r_meshbuffer_t *R_BufferData_Store(size_t datasize, const void *data, r_bufferda
 
        // if the resize did not give us enough memory, fail
        if (!r_bufferdata_buffer[r_bufferdata_cycle][type] || r_bufferdata_buffer[r_bufferdata_cycle][type]->current + padsize > r_bufferdata_buffer[r_bufferdata_cycle][type]->size)
-               Sys_Error("R_BufferData_Store: failed to create a new buffer of sufficient size\n");
+               Sys_Abort("R_BufferData_Store: failed to create a new buffer of sufficient size\n");
 
        mem = r_bufferdata_buffer[r_bufferdata_cycle][type];
        offset = (int)mem->current;
@@ -8549,7 +8549,7 @@ void RSurf_DrawBatch(void)
                                if (c >= rsurface.modelsurfaces[j].num_firstvertex && c < (rsurface.modelsurfaces[j].num_firstvertex + rsurface.modelsurfaces[j].num_vertices))
                                {
                                        if (rsurface.modelsurfaces[j].texture != rsurface.texture)
-                                               Sys_Error("RSurf_DrawBatch: index %i uses different texture (%s) than surface %i which it belongs to (which uses %s)\n", c, rsurface.texture->name, j, rsurface.modelsurfaces[j].texture->name);
+                                               Sys_Abort("RSurf_DrawBatch: index %i uses different texture (%s) than surface %i which it belongs to (which uses %s)\n", c, rsurface.texture->name, j, rsurface.modelsurfaces[j].texture->name);
                                        break;
                                }
                        }