summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-11-01 10:27:04 -0300
committerGeorge Marques <george@gmarqu.es>2018-11-01 10:27:04 -0300
commit4c9d734a756628ebc1dbf7b19ca335146c0e6393 (patch)
treeadd0d7f96c12a331658b88b933abe470e17e1315 /platform/osx/os_osx.mm
parentaec8ea4f47af23e6acff181189bbbfaf7f3d18f5 (diff)
Fix initialization of visual server in all platforms
Avoid leaking an extra instance when using threads. Also fix threaded loading issues on Android and iOS.
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r--platform/osx/os_osx.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index b84e22f53c..cbdec92b90 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1383,10 +1383,11 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
video_driver_index = p_video_driver;
- visual_server = memnew(VisualServerRaster);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
visual_server->init();