From 126678779c396125cea847e52d06ae4b3ef03d92 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 23 May 2016 22:21:05 +0200 Subject: * PBN temp file checks before save --- PBNFile.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PBNFile.cs b/PBNFile.cs index bec7fcd..5526623 100644 --- a/PBNFile.cs +++ b/PBNFile.cs @@ -58,6 +58,10 @@ namespace BCDD public void Save() { + if (this.outputFile == null) + { + throw new IOException("No boards written to PBN file, unable to save it."); + } this.outputFile.Flush(); this.outputFile.Close(); File.Delete(this.filename); -- cgit v1.2.3