drop app container early

This commit is contained in:
highflowey 2024-08-23 04:29:17 +03:30
parent 25b09b18ac
commit 3d9bb89255

View file

@ -72,6 +72,8 @@ impl RequireContext {
let mutli_clone = multi.clone();
let multi_reg = lua.create_registry_value(mutli_clone.into_vec())?;
drop(data_ref);
let mut data = lua
.app_data_mut::<RequireContextData>()
.ok_or(LuaError::runtime("Couldn't find RequireContextData in app data container, make sure RequireStorage::init is called on this lua instance"))?;