mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-22 21:31:07 -05:00
attempt at fixing a bug that can cause a crash in p3filelists.cc
This commit is contained in:
parent
c61ccda431
commit
cda3c744af
@ -896,9 +896,9 @@ uint32_t p3FileDatabase::getType(void *ref) const
|
||||
if(e == 0)
|
||||
return DIR_TYPE_PERSON ;
|
||||
|
||||
if(fi == 0)
|
||||
if(fi == 0 && mLocalSharedDirs != NULL)
|
||||
return mLocalSharedDirs->getEntryType(e) ;
|
||||
else if(mRemoteDirectories[fi-1]!=NULL)
|
||||
else if(fi-1 < mRemoteDirectories.size() && mRemoteDirectories[fi-1]!=NULL)
|
||||
return mRemoteDirectories[fi-1]->getEntryType(e) ;
|
||||
else
|
||||
return DIR_TYPE_ROOT ;// some failure case. Should not happen
|
||||
|
Loading…
Reference in New Issue
Block a user