Init the ref_count with 1, since the first AddPath() would leave it
at 0. A single AddPath()+RemovePath() would therefore leave a not anymore needed path_entry(), while a AddPath()+AddPath()+RemovePath() would remove/delete the path_entry while it was actually still used. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28349 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
887be5801a
commit
dae439fe60
@ -16,7 +16,7 @@
|
||||
struct PathList::path_entry {
|
||||
path_entry(const char* _path)
|
||||
:
|
||||
ref_count(0)
|
||||
ref_count(1)
|
||||
{
|
||||
path = strdup(_path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user