]> git.sesse.net Git - nageru/blobdiff - futatabi/flow.cpp
On errors, abort() instead of exit(1); exit() in a multithreaded program just gives...
[nageru] / futatabi / flow.cpp
index 90317da70a5ab62d4b72a9036f374cb24a50628f..8ae7bfc259fcfd9ddc3c4ea2b52cf11787b43ddf 100644 (file)
@@ -83,7 +83,7 @@ GLuint compile_shader(const string &shader_src, GLenum type)
                }
 
                fprintf(stderr, "Failed to compile shader:\n%s\n", src_with_lines.c_str());
-               exit(1);
+               abort();
        }
 
        return obj;
@@ -101,7 +101,7 @@ GLuint link_program(GLuint vs_obj, GLuint fs_obj)
                GLchar error_log[1024] = { 0 };
                glGetProgramInfoLog(program, 1024, nullptr, error_log);
                fprintf(stderr, "Error linking program: %s\n", error_log);
-               exit(1);
+               abort();
        }
        return program;
 }