diff --git a/srcs/RT.cpp b/srcs/RT.cpp index 86b4d51..2c1607e 100644 --- a/srcs/RT.cpp +++ b/srcs/RT.cpp @@ -6,7 +6,7 @@ /* By: ycontre +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */ -/* Updated: 2025/01/08 20:09:47 by ycontre ### ########.fr */ +/* Updated: 2025/01/09 16:17:29 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,7 +16,7 @@ int main(int argc, char **argv) { Scene scene; - if (argc > 1 && !scene.parseScene(argv[1])) + if (argc <= 1 || !scene.parseScene(argv[1])) return (1); Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 0); @@ -86,4 +86,4 @@ int main(int argc, char **argv) } return (0); -} \ No newline at end of file +} diff --git a/srcs/class/Window.cpp b/srcs/class/Window.cpp index c8e44de..c9ff5f0 100644 --- a/srcs/class/Window.cpp +++ b/srcs/class/Window.cpp @@ -6,7 +6,7 @@ /* By: ycontre +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/13 16:16:24 by TheRed #+# #+# */ -/* Updated: 2024/12/23 18:39:37 by ycontre ### ########.fr */ +/* Updated: 2025/01/09 16:34:48 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -48,8 +48,6 @@ Window::Window(Scene *scene, int width, int height, const char *title, int sleep Window::~Window(void) { - delete _scene; - glfwTerminate(); } @@ -163,4 +161,4 @@ float Window::getFps(void) const int Window::getFrameCount(void) const { return (_frameCount); -} \ No newline at end of file +}