mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-15 14:17:43 +00:00
Linux: Fixed rare crashes when opening debugger (when loading a DBG file)
This commit is contained in:
parent
39f2a1e2ff
commit
7f7d7ab1b3
@ -498,7 +498,7 @@ namespace Mesen.GUI.Debugger
|
||||
|
||||
public string GetLineComment(int lineNumber)
|
||||
{
|
||||
if(_code.SymbolProvider != null && _code._config.ShowSourceAsComments) {
|
||||
if(_code.SymbolProvider != null && _code._config?.ShowSourceAsComments == true) {
|
||||
AddressTypeInfo addressInfo = _code.GetAddressInfo(lineNumber);
|
||||
if(addressInfo.Type == AddressType.PrgRom) {
|
||||
return _code.SymbolProvider.GetSourceCodeLine(addressInfo.Address);
|
||||
|
@ -178,6 +178,11 @@ namespace Mesen.GUI.Debugger
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
ctrlDebuggerCode.Visible = true;
|
||||
ctrlDebuggerCodeSplit.Visible = true;
|
||||
ctrlSourceViewer.Visible = true;
|
||||
ctrlSourceViewerSplit.Visible = true;
|
||||
|
||||
ctrlDebuggerCode.CodeViewerActions.OnSetNextStatement += ctrlDebuggerCode_OnSetNextStatement;
|
||||
ctrlDebuggerCode.CodeViewerActions.OnShowInSplitView += ctrlDebuggerCode_OnShowInSplitView;
|
||||
ctrlDebuggerCode.CodeViewerActions.OnSwitchView += ctrlDebuggerCode_OnSwitchView;
|
||||
@ -186,9 +191,6 @@ namespace Mesen.GUI.Debugger
|
||||
ctrlDebuggerCodeSplit.CodeViewerActions.OnShowInSplitView += ctrlDebuggerCode_OnShowInSplitView;
|
||||
ctrlDebuggerCodeSplit.CodeViewerActions.OnSwitchView += ctrlDebuggerCode_OnSwitchView;
|
||||
|
||||
ctrlSourceViewer.Visible = true;
|
||||
ctrlSourceViewerSplit.Visible = true;
|
||||
|
||||
ctrlSourceViewer.CodeViewerActions.OnSetNextStatement += ctrlDebuggerCode_OnSetNextStatement;
|
||||
ctrlSourceViewer.CodeViewerActions.OnShowInSplitView += ctrlDebuggerCode_OnShowInSplitView;
|
||||
ctrlSourceViewer.CodeViewerActions.OnSwitchView += ctrlDebuggerCode_OnSwitchView;
|
||||
|
Loading…
x
Reference in New Issue
Block a user