Only try to store attributes on destruction if the required root node is available. Should fix bug #3426 where an incompletely constructed volume object is deleted.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29166 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-02-08 16:55:45 +00:00
parent 81796bc0b3
commit 2d871992b8

View File

@ -508,10 +508,13 @@ Volume::Volume(fs_volume* fsVolume)
Volume::~Volume()
{
_StoreAttributes();
_StoreSharedAttributes();
if (fRootNode) {
_StoreAttributes();
_StoreSharedAttributes();
}
close(fDevice);
if (fDevice >= 0)
close(fDevice);
// put_vnode on the root to release the ref to it
if (fRootNode)