aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-14 13:50:43 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:55:30 (GMT)
commitd7d15fc64750bd92e278496092e323cff55e6a78 (patch)
tree7a15d8bc5eee70e1d42fddb7187d36b885f2f953 /src
parent7558677fd8b77fbb62440e83578effc48bb1e392 (diff)
downloadfluxbox_paul-d7d15fc64750bd92e278496092e323cff55e6a78.zip
fluxbox_paul-d7d15fc64750bd92e278496092e323cff55e6a78.tar.bz2
Make lua resource manager automatically initialize lua state if needed
Diffstat (limited to 'src')
-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}