summaryrefslogtreecommitdiff
path: root/PBNFile.cs
diff options
context:
space:
mode:
Diffstat (limited to 'PBNFile.cs')
-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);