Debugger: Make attaching a backend idempotent

This commit is contained in:
Vicki Pfau 2017-04-21 16:20:52 -07:00
parent a159e37793
commit 8b805b3909
2 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,7 @@ Misc:
- Qt: Add .gb/.gbc files to the extension list in Info.plist - Qt: Add .gb/.gbc files to the extension list in Info.plist
- Feature: Make -l option explicit - Feature: Make -l option explicit
- Core: Ability to enumerate and modify video and audio channels - Core: Ability to enumerate and modify video and audio channels
- Debugger: Make attaching a backend idempotent
0.5.2: (2016-12-31) 0.5.2: (2016-12-31)
Bugfixes: Bugfixes:

View File

@ -751,6 +751,9 @@ void CLIDebuggerAttachSystem(struct CLIDebugger* debugger, struct CLIDebuggerSys
} }
void CLIDebuggerAttachBackend(struct CLIDebugger* debugger, struct CLIDebuggerBackend* backend) { void CLIDebuggerAttachBackend(struct CLIDebugger* debugger, struct CLIDebuggerBackend* backend) {
if (debugger->backend == backend) {
return;
}
if (debugger->backend && debugger->backend->deinit) { if (debugger->backend && debugger->backend->deinit) {
debugger->backend->deinit(debugger->backend); debugger->backend->deinit(debugger->backend);
} }