aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/LResource.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/FbTk/LResource.cc b/src/FbTk/LResource.cc
index 2e2a7c7..b91f0d8 100644
--- a/src/FbTk/LResource.cc
+++ b/src/FbTk/LResource.cc
@@ -104,6 +104,11 @@ LResourceManager::LResourceManager(const std::string &root, lua::state &l)
104 lua::stack_sentry s(l); 104 lua::stack_sentry s(l);
105 105
106 l.getfield(lua::REGISTRYINDEX, make_root); 106 l.getfield(lua::REGISTRYINDEX, make_root);
107 if(l.isnil(-1)) {
108 l.pop();
109 initState(l);
110 l.getfield(lua::REGISTRYINDEX, make_root);
111 }
107 l.pushstring(root); 112 l.pushstring(root);
108 l.call(1, 0); 113 l.call(1, 0);
109} 114}