Skip to content

Commit

Permalink
Fix accessing to current object
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Jul 28, 2023
1 parent b62ccd1 commit 0b5119e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/xrCore/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@ IReader* IReader::open_chunk(u32 ID)
}
} else return 0;
};
void IReader::close()
{ xr_delete((IReader*)this); }

void IReader::close() {
auto pointer = (IReader*) this;
xr_delete(pointer);
}

IReader* IReader::open_chunk_iterator (u32& ID, IReader* _prev)
{
Expand Down
3 changes: 2 additions & 1 deletion src/xr_3da/xrGame/space_restriction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,9 @@ void CSpaceRestriction::remove_border ()

u32 CSpaceRestriction::accessible_nearest (const Fvector &position, Fvector &result)
{
auto pointer = this;
if (m_out_space_restriction)
return (m_out_space_restriction->accessible_nearest(this,position,result,true));
return (m_out_space_restriction->accessible_nearest(pointer, position, result, true));

VERIFY (m_in_space_restriction);
return (m_in_space_restriction->accessible_nearest(m_in_space_restriction,position,result,false));
Expand Down

0 comments on commit 0b5119e

Please sign in to comment.