From 01a518c7543d6254e0e8a5061fad42e7c1c382cb Mon Sep 17 00:00:00 2001 From: aka kautinkazu <81628831+chris1384@users.noreply.github.com> Date: Sat, 28 Sep 2024 03:19:02 +0300 Subject: [PATCH 1/2] fix warnings --- [editor]/editor_main/server/mapsettingssync.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/[editor]/editor_main/server/mapsettingssync.lua b/[editor]/editor_main/server/mapsettingssync.lua index 603ae2747..822270862 100644 --- a/[editor]/editor_main/server/mapsettingssync.lua +++ b/[editor]/editor_main/server/mapsettingssync.lua @@ -191,6 +191,9 @@ function passDefaultMapSettings() end function passNewMapSettings() + + if type(loadedMap) ~= "string" then return false end + local mapResource = getResourceFromName(loadedMap) --General settings From 3bd24e36a91b41e12a241cb6ee8e20e4a9fdfe54 Mon Sep 17 00:00:00 2001 From: aka kautinkazu <81628831+chris1384@users.noreply.github.com> Date: Sat, 28 Sep 2024 03:25:57 +0300 Subject: [PATCH 2/2] fix 2 --- [editor]/editor_main/server/mapsettingssync.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/[editor]/editor_main/server/mapsettingssync.lua b/[editor]/editor_main/server/mapsettingssync.lua index 822270862..dfe08d0a8 100644 --- a/[editor]/editor_main/server/mapsettingssync.lua +++ b/[editor]/editor_main/server/mapsettingssync.lua @@ -192,9 +192,16 @@ end function passNewMapSettings() - if type(loadedMap) ~= "string" then return false end + if type(loadedMap) ~= "string" then + return false + end local mapResource = getResourceFromName(loadedMap) + + if not mapResource then + loadedMap = false + return false + end --General settings local settings = getSettings(mapResource)