From dae439fe60673bdef9b9ade41fa14b7b3c5f14a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 27 Oct 2008 16:44:58 +0000 Subject: [PATCH] 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 --- src/servers/input/PathList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/input/PathList.cpp b/src/servers/input/PathList.cpp index 9117aa51c5..f71bec5120 100644 --- a/src/servers/input/PathList.cpp +++ b/src/servers/input/PathList.cpp @@ -16,7 +16,7 @@ struct PathList::path_entry { path_entry(const char* _path) : - ref_count(0) + ref_count(1) { path = strdup(_path); }