aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.c
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2018-11-07 08:19:46 +0100
committerBenoit Germain <bnt.germain@gmail.com>2018-11-07 08:19:46 +0100
commitc57bc44324a767407d1eb9f95e3c7589700f042e (patch)
treead0fd1c15a31157c1ba4532840aa41decb04f124 /src/lanes.c
parentef8fc2c4a215110b034424f9c423111d34963f31 (diff)
downloadlanes-c57bc44324a767407d1eb9f95e3c7589700f042e.tar.gz
lanes-c57bc44324a767407d1eb9f95e3c7589700f042e.tar.bz2
lanes-c57bc44324a767407d1eb9f95e3c7589700f042e.zip
Fix potential crash at application shutdown when deep userdata were created before Lanes is required
Diffstat (limited to 'src/lanes.c')
-rw-r--r--src/lanes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lanes.c b/src/lanes.c
index 7b1a707..d4b4c73 100644
--- a/src/lanes.c
+++ b/src/lanes.c
@@ -1756,7 +1756,10 @@ static int selfdestruct_gc( lua_State* L)
1756 // Locks for 'tools.c' inc/dec counters 1756 // Locks for 'tools.c' inc/dec counters
1757 MUTEX_FREE( &U->deep_lock); 1757 MUTEX_FREE( &U->deep_lock);
1758 MUTEX_FREE( &U->mtid_lock); 1758 MUTEX_FREE( &U->mtid_lock);
1759 1759 // universe is no longer available (nor necessary)
1760 // we need to do this in case some deep userdata objects were created before Lanes was initialized,
1761 // as potentially they will be garbage collected after Lanes at application shutdown
1762 universe_store( L, NULL);
1760 return 0; 1763 return 0;
1761} 1764}
1762 1765