Author: anevilyak Date: 2010-02-21 16:48:09 +0100 (Sun, 21 Feb 2010) New Revision: 35552 Changeset: http://dev.haiku-os.org/changeset/35552/haiku Modified: haiku/trunk/src/kits/storage/Resources.cpp Log: Initialize members for all constructors. Otherwise using those constructors can potentially crash in Unset(). Modified: haiku/trunk/src/kits/storage/Resources.cpp =================================================================== --- haiku/trunk/src/kits/storage/Resources.cpp 2010-02-21 13:22:48 UTC (rev 35551) +++ haiku/trunk/src/kits/storage/Resources.cpp 2010-02-21 15:48:09 UTC (rev 35552) @@ -79,6 +79,10 @@ \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 @@ \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);