mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix get_server() in WebNode.
This commit is contained in:
parent
f7cc2df683
commit
1f62ad89ff
@ -340,8 +340,19 @@ void WebNode::request_write_lock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebServer *WebNode::get_server() {
|
WebServer *WebNode::get_server() {
|
||||||
// todo this shoult probably be cached
|
Node *n = this;
|
||||||
return Object::cast_to<WebServer>(get_tree());
|
|
||||||
|
while (n) {
|
||||||
|
WebServer *ws = Object::cast_to<WebServer>(n);
|
||||||
|
|
||||||
|
if (ws) {
|
||||||
|
return ws;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = n->get_parent();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebNode *WebNode::get_web_root() {
|
WebNode *WebNode::get_web_root() {
|
||||||
|
Loading…
Reference in New Issue
Block a user