diff options
| author | Cody Northrop <cody@lunarg.com> | 2015-09-09 10:21:49 -0600 |
|---|---|---|
| committer | Cody Northrop <cody@lunarg.com> | 2015-09-09 12:46:00 -0600 |
| commit | c9a1f1baa667eeb1de8bed90017834fb7faf5ca5 (patch) | |
| tree | 39ca7c7caa713cbec10a7aee083fca0873b2f50e | |
| parent | 101a077f1681162c5acd2615ef579bd5293a13e4 (diff) | |
| download | usermoji-c9a1f1baa667eeb1de8bed90017834fb7faf5ca5.tar.xz | |
demos: Prevent tri rendering during shutdown
| -rw-r--r-- | demos/tri.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/demos/tri.c b/demos/tri.c index feb187d9..95066338 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -1544,8 +1544,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, PostQuitMessage(0); return 0; case WM_PAINT: - demo_run(&demo); - return 0; + if (demo.prepared) { + demo_run(&demo); + return 0; + } default: break; } @@ -2149,6 +2151,8 @@ static void demo_cleanup(struct demo *demo) { uint32_t i; + demo->prepared = false; + for (i = 0; i < DEMO_BUFFER_COUNT; i++) { vkDestroyFramebuffer(demo->device, demo->framebuffers[i]); } |
