mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 14:27:14 +00:00
Paranoia
svn-id: r22379
This commit is contained in:
parent
027fb7febe
commit
b2d4cd6a35
@ -37,6 +37,7 @@ FilesystemNode::FilesystemNode(AbstractFilesystemNode *realNode) {
|
||||
FilesystemNode::FilesystemNode() {
|
||||
if (_rootNode == 0) {
|
||||
_rootNode = AbstractFilesystemNode::getRoot();
|
||||
assert(_rootNode);
|
||||
_rootRefCount = new int(1);
|
||||
}
|
||||
_realNode = _rootNode;
|
||||
@ -60,8 +61,9 @@ FilesystemNode::~FilesystemNode() {
|
||||
}
|
||||
|
||||
void FilesystemNode::decRefCount() {
|
||||
assert(*_refCount > 0);
|
||||
--(*_refCount);
|
||||
if (*_refCount <= 0) {
|
||||
if (*_refCount == 0) {
|
||||
delete _refCount;
|
||||
delete _realNode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user