summaryrefslogtreecommitdiff
path: root/src/interface/Engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/Engine.cpp')
-rw-r--r--src/interface/Engine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp
index 0fb24a3..731f265 100644
--- a/src/interface/Engine.cpp
+++ b/src/interface/Engine.cpp
@@ -116,16 +116,16 @@ int Engine::CloseWindow()
{
if(!windows.empty())
{
+ if (lastBuffer)
+ {
+ free(lastBuffer);
+ lastBuffer = NULL;
+ }
if(!prevBuffers.empty())
{
lastBuffer = prevBuffers.top();
prevBuffers.pop();
}
- else
- {
- free(lastBuffer);
- lastBuffer = NULL;
- }
state_ = windows.top();
windows.pop();