Skip to content

Commit fbd7709

Browse files
committed
Don't try to parse or render if we errored before
It catches and displays the exception, but doesn't stop processing.
1 parent 0fdfb4a commit fbd7709

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

smxviewer/MainWindow.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
5050
catch (Exception ex)
5151
{
5252
MessageBox.Show("Could not open file: " + ex.Message, "File error", MessageBoxButtons.OK, MessageBoxIcon.Error);
53+
return;
5354
}
5455

5556
try
@@ -63,6 +64,7 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
6364
catch (Exception ex)
6465
{
6566
MessageBox.Show("Could not parse file: " + ex.Message);
67+
return;
6668
}
6769

6870
renderFile();

0 commit comments

Comments
 (0)