Skip to content

Commit

Permalink
xrCore/FS (IReader): Fixed close() compilation.
Browse files Browse the repository at this point in the history
There was a deletion call xr_delete(this) and xr_delete() tries to
set passed argument (this) to NULL, or accept a pointer to const,
which is not the case either.

Used the same thing, as in other close() methods:
introduced variable self, which is passed to xr_delete().
  • Loading branch information
Kaffeine committed Nov 13, 2015
1 parent 1ae74ad commit 8c7bd75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xrCore/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ IReader* IReader::open_chunk(u32 ID)
};
void IReader::close()
{
xr_delete((IReader*)this);
IReader *self = this;
xr_delete(self);
}

#include "FS_impl.h"
Expand Down

0 comments on commit 8c7bd75

Please sign in to comment.