crash fix

This commit is contained in:
Attila Uygun 2023-05-25 10:48:19 +02:00
parent a7ea09b149
commit aca0213b0a
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
#include "engine/shader_source.h"
#include "third_party/texture_compressor/texture_compressor.h"
#define USE_VULKAN_RENDERER 0
#define USE_VULKAN_RENDERER 1
using namespace base;
@ -50,6 +50,7 @@ Engine::Engine(Platform* platform)
Engine::~Engine() {
LOG << "Shutting down engine.";
game_.reset();
stats_.reset();
textures_.clear();

View File

@ -145,7 +145,9 @@ bool Platform::CreateWindow(int width, int height) {
void Platform::DestroyWindow() {
if (display_) {
XDestroyWindow(display_, window_);
#if 0 // TODO: Figure out why XCloseDisplay is crashing
XCloseDisplay(display_);
#endif
display_ = nullptr;
window_ = 0;
}