From cf139460f606b13aed162f245f8282170e363350 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 21 Feb 2010 15:48:09 +0000 Subject: [PATCH] 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 --- src/kits/storage/Resources.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/kits/storage/Resources.cpp b/src/kits/storage/Resources.cpp index a5cd00c279..ecfd8d4fcd 100644 --- a/src/kits/storage/Resources.cpp +++ b/src/kits/storage/Resources.cpp @@ -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);