putil: BamWriter doc fix, initialize _root_node field properly

This commit is contained in:
rdb 2024-10-31 13:05:31 +01:00
parent 5dcd70dcb5
commit 89c0371cbb
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -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<int, int_hash> _types_written;