diff --git a/panda/src/putil/bamWriter.I b/panda/src/putil/bamWriter.I index ad8b119edf..b9e36d421f 100644 --- a/panda/src/putil/bamWriter.I +++ b/panda/src/putil/bamWriter.I @@ -96,6 +96,9 @@ get_file_texture_mode() const { * Changes the BamTextureMode preference for the Bam file currently being * written. Texture objects written to this Bam file will be encoded * according to the specified mode. + * + * This should be called after the call to init(), or it will be overwritten + * with the default mode in the config file. */ INLINE void BamWriter:: set_file_texture_mode(BamTextureMode file_texture_mode) { diff --git a/panda/src/putil/bamWriter.h b/panda/src/putil/bamWriter.h index fa9c0ca188..63328de177 100644 --- a/panda/src/putil/bamWriter.h +++ b/panda/src/putil/bamWriter.h @@ -135,7 +135,7 @@ private: // Stores the PandaNode representing the root of the node hierarchy we are // currently writing, if any, for the purpose of writing NodePaths. This is // a TypedWritable since PandaNode is defined in pgraph. - TypedWritable *_root_node; + TypedWritable *_root_node = nullptr; // This is the set of all TypeHandles already written. pset _types_written;