1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-12 23:29:32 +00:00

Exit without crashing when app init fails

This commit is contained in:
Andy McFadden 2018-09-30 21:41:46 -07:00
parent e41247f759
commit 11174b8e75
2 changed files with 13 additions and 5 deletions

View File

@ -2,8 +2,9 @@
[Features](#key-features) - [Getting Started](#getting-started) - [About the Code](#about-the-code)
6502bench is a code development "workbench" for 6502, 65C02, and 65802/65816
code. It currently features one tool, the SourceGen disassembler.
[6502bench](https://6502bench.com/) is a code development "workbench"
for 6502, 65C02, and 65802/65816 code. It currently features one tool,
the SourceGen disassembler.
You can download the source code and build it yourself, or click the
["Releases" tab](https://github.com/fadden/6502bench/releases) for
@ -79,9 +80,10 @@ Miscellaneous:
allow the project to be shared without violating copyrights (subject to
local laws).
There are a couple of significant areas where support is currently lacking:
- Poor support for multi-bank 65816 files (IIgs OMF, SNES).
- No support for alternate character sets (e.g. PETSCII).
Some planned features are not yet implemented. Notable among them are
support for multi-bank 65816 files (IIgs OMF, SNES), and alternate
character sets (e.g. PETSCII). Visit the wiki section for the
[current "TO DO" list](https://github.com/fadden/6502bench/wiki/TO-DO-List).
## Getting Started ##

View File

@ -1411,6 +1411,12 @@ namespace SourceGen.AppForms {
// App is closing.
private void ProjectView_FormClosing(object sender, FormClosingEventArgs e) {
Debug.WriteLine("Main app form closing (reason=" + e.CloseReason + ")");
if (mProjectControl == null) {
// This can be null if something failed during startup, so we're exiting
// the application before the UI is fully up.
return;
}
if (!DoClose()) {
e.Cancel = true;
return;