diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/MemoryPadCommands.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/MemoryPadCommands.cs index 6c0809a1a5..c234d50292 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/MemoryPadCommands.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/Commands/MemoryPadCommands.cs @@ -119,7 +119,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads { if (this.pad != null && this.comboBox != null) { pad.DisplayByteSize = Convert.ToByte(this.comboBox.SelectedValue); - pad.ChangeByteDisplay(); + pad.DisplayMemory(); } base.Run(); } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/MemoryPad.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/MemoryPad.cs index 914d7cfb05..ed225f50a1 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/MemoryPad.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/MemoryPad.cs @@ -188,10 +188,10 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads return; } - ChangeByteDisplay(); + DisplayMemory(); } - public void ChangeByteDisplay() + public void DisplayMemory() { if (memory == null || memory.Length == 0) return; diff --git a/src/AddIns/Debugger/Debugger.Core/Interop/NativeMethods.cs b/src/AddIns/Debugger/Debugger.Core/Interop/NativeMethods.cs index 1c65879a1f..5c9e6c2d8d 100644 --- a/src/AddIns/Debugger/Debugger.Core/Interop/NativeMethods.cs +++ b/src/AddIns/Debugger/Debugger.Core/Interop/NativeMethods.cs @@ -169,9 +169,9 @@ namespace Debugger.Interop public static byte[] ReadProcessMemory(this Process process, long startAddress, long size) { IntPtr openedProcess = IntPtr.Zero; - byte[] temp = new byte[size]; - + byte[] temp = null; try { + temp = new byte[size]; openedProcess = OpenProcess(ProcessAccessFlags.All, false, (int)process.Id); int outSize;