Skip to content

Commit

Permalink
Merge pull request dotnet#1745 from ww898/thread_static_struct_issue
Browse files Browse the repository at this point in the history
GetStaticFieldAddrNoCreate() returns data offset instead of NULL
  • Loading branch information
noahfalk committed Jan 19, 2016
2 parents 858827e + d10d183 commit 2d2e591
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vm/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10634,8 +10634,10 @@ TADDR Thread::GetStaticFieldAddrNoCreate(FieldDesc *pFD, PTR_AppDomain pDomain)
if (pFD->IsByValue())
{
_ASSERTE(result != NULL);
result = dac_cast<TADDR>
((* PTR_UNCHECKED_OBJECTREF(result))->GetData());
PTR_Object obj = *PTR_UNCHECKED_OBJECTREF(result);
if (obj == NULL)
return NULL;
result = dac_cast<TADDR>(obj->GetData());
}

return result;
Expand Down

0 comments on commit 2d2e591

Please sign in to comment.