mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-08 19:08:46 -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)
|
if(e == 0)
|
||||||
return DIR_TYPE_PERSON ;
|
return DIR_TYPE_PERSON ;
|
||||||
|
|
||||||
if(fi == 0)
|
if(fi == 0 && mLocalSharedDirs != NULL)
|
||||||
return mLocalSharedDirs->getEntryType(e) ;
|
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) ;
|
return mRemoteDirectories[fi-1]->getEntryType(e) ;
|
||||||
else
|
else
|
||||||
return DIR_TYPE_ROOT ;// some failure case. Should not happen
|
return DIR_TYPE_ROOT ;// some failure case. Should not happen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user