diff --git a/ion/src/simulator/shared/state_file.cpp b/ion/src/simulator/shared/state_file.cpp index 124c806fe..57057cfe8 100644 --- a/ion/src/simulator/shared/state_file.cpp +++ b/ion/src/simulator/shared/state_file.cpp @@ -58,7 +58,9 @@ void load(const char * filename) { return; } load(f); - fclose(f); + if (f != stdin) { + fclose(f); + } } static inline bool save(FILE * f) {