diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/server/os_server.cpp | 5 | ||||
-rw-r--r-- | platform/server/os_server.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 60f20d6009..5d67e2113f 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -99,7 +99,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int _ensure_user_data_dir(); - resource_loader_dummy = memnew(ResourceFormatDummyTexture); + resource_loader_dummy.instance(); ResourceLoader::add_resource_format_loader(resource_loader_dummy); return OK; @@ -118,7 +118,8 @@ void OS_Server::finalize() { memdelete(power_manager); - memdelete(resource_loader_dummy); + ResourceLoader::remove_resource_format_loader(resource_loader_dummy); + resource_loader_dummy.unref(); args.clear(); } diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 0367ec3db9..b5dc7900e6 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -77,7 +77,7 @@ class OS_Server : public OS_Unix { int video_driver_index; - ResourceFormatDummyTexture *resource_loader_dummy; + Ref<ResourceFormatDummyTexture> resource_loader_dummy; protected: virtual int get_video_driver_count() const; |