- file descriptor check fixed

This commit is contained in:
Volker Ruppert 2006-06-16 09:10:26 +00:00
parent a2327441ca
commit 43838a54fa

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: siminterface.cc,v 1.163 2006-06-11 18:03:11 vruppert Exp $
// $Id: siminterface.cc,v 1.164 2006-06-16 09:10:26 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// See siminterface.h for description of the siminterface concept.
@ -1171,7 +1171,7 @@ void bx_real_sim_c::save_sr_param(FILE *fp, bx_param_c *node, const char *sr_pat
else
sprintf(tmpstr, "%s.%s", node->get_parent()->get_name(), node->get_name());
fp2 = fopen(tmpstr, "wb");
if (fp != NULL) {
if (fp2 != NULL) {
fwrite(((bx_shadow_data_c*)node)->getptr(), 1, ((bx_shadow_data_c*)node)->get_size(), fp2);
fclose(fp2);
}