fix uninitialized state being potentially (usually) invalid

This commit is contained in:
2020-05-20 22:30:41 -04:00
parent aa966c6917
commit 50ec2476eb

View File

@@ -225,7 +225,7 @@ void run(const std::string &config_file, GLFWwindow *window) {
auto scene = YAML::LoadFile(config_file);
State state;
State state{};
glfwSetWindowUserPointer(window, &state);
state.dimension = scene["dimension"].as<int>();