Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Made thread_stackBottom() work correctly when called from non-D threads.
Browse files Browse the repository at this point in the history
  • Loading branch information
complexmath committed Sep 30, 2011
1 parent 9dca50f commit e822f88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,9 @@ void[] thread_getTLSBlock()
*/
extern (C) void* thread_stackBottom()
{
return Thread.getThis().topContext().bstack;
if( auto t = Thread.getThis() )
return t.topContext().bstack;
return rt_stackBottom();
}

///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit e822f88

Please sign in to comment.