From 79e839a8969c9b00dddb229b5811aef0783d039d Mon Sep 17 00:00:00 2001 From: Amorilia <amorilia@users.sourceforge.net> Date: Tue, 21 Mar 2006 05:59:56 +0000 Subject: [PATCH] Corrected silly bug in WriteFileGroup. --- niflib.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/niflib.cpp b/niflib.cpp index 40791650..168e6cd7 100644 --- a/niflib.cpp +++ b/niflib.cpp @@ -721,8 +721,10 @@ void WriteFileGroup( string const & file_name, blk_ref const & root_block, unsig blk_ref xkf_root; Kfm kfm; // dummy SplitNifTree( root_block, xnif_root, xkf_root, kfm, KF_MW ); - WriteNifTree( file_name_path + "x" + file_name_base + ".nif", xnif_root, version ); // simply export the NIF file! - WriteNifTree( file_name_path + "x" + file_name_base + ".kf", xkf_root, version ); // simply export the NIF file! + if ( ! xnif_root.is_null() ) { + WriteNifTree( file_name_path + "x" + file_name_base + ".nif", xnif_root, version ); + WriteNifTree( file_name_path + "x" + file_name_base + ".kf", xkf_root, version ); + }; } else throw runtime_error("Invalid export option."); } else -- GitLab