summaryrefslogtreecommitdiff
path: root/core/command_queue_mt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/command_queue_mt.cpp')
-rw-r--r--core/command_queue_mt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/command_queue_mt.cpp b/core/command_queue_mt.cpp
index d23a6425e3..ace210ca2c 100644
--- a/core/command_queue_mt.cpp
+++ b/core/command_queue_mt.cpp
@@ -94,12 +94,14 @@ tryagain:
}
CommandQueueMT::CommandQueueMT(bool p_sync) {
- if (p_sync)
+ if (p_sync) {
sync = memnew(Semaphore);
+ }
}
CommandQueueMT::~CommandQueueMT() {
- if (sync)
+ if (sync) {
memdelete(sync);
+ }
memfree(command_mem);
}