Initialize members for all constructors. Otherwise using those constructors can potentially crash in Unset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35552 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
307dfe9300
commit
cf139460f6
@ -79,6 +79,10 @@ BResources::BResources(const BFile *file, bool clobber)
|
||||
\param clobber if \c true, the file's resources are truncated to size 0
|
||||
*/
|
||||
BResources::BResources(const char *path, bool clobber)
|
||||
: fFile(),
|
||||
fContainer(NULL),
|
||||
fResourceFile(NULL),
|
||||
fReadOnly(false)
|
||||
{
|
||||
fContainer = new(nothrow) ResourcesContainer;
|
||||
SetTo(path, clobber);
|
||||
@ -95,6 +99,10 @@ BResources::BResources(const char *path, bool clobber)
|
||||
\param clobber if \c true, the file's resources are truncated to size 0
|
||||
*/
|
||||
BResources::BResources(const entry_ref *ref, bool clobber)
|
||||
: fFile(),
|
||||
fContainer(NULL),
|
||||
fResourceFile(NULL),
|
||||
fReadOnly(false)
|
||||
{
|
||||
fContainer = new(nothrow) ResourcesContainer;
|
||||
SetTo(ref, clobber);
|
||||
|
Loading…
Reference in New Issue
Block a user