summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server/gdscript_language_protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/language_server/gdscript_language_protocol.cpp')
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 8a470d9869..ae2aaf6aee 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -153,9 +153,10 @@ Error GDScriptLanguageProtocol::start(int p_port) {
}
void GDScriptLanguageProtocol::stop() {
- const int *ptr = NULL;
- while (ptr = clients.next(ptr)) {
+ const int *ptr = clients.next(NULL);
+ while (ptr) {
clients.get(*ptr)->close();
+ ptr = clients.next(ptr);
}
server->stop();
clients.clear();