summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-23 22:21:05 +0200
committeremkael <emkael@tlen.pl>2016-05-23 22:21:05 +0200
commit126678779c396125cea847e52d06ae4b3ef03d92 (patch)
tree6ce95b7a2f4be65f13230301993a122409fa6fc7
parentde13333bdef5458200e83f326a0a9e7f26de1681 (diff)
* PBN temp file checks before save
-rw-r--r--PBNFile.cs4
1 files changed, 4 insertions, 0 deletions
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);