diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs index 69e44af273..2439653d15 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs @@ -240,13 +240,13 @@ namespace Debugger internal static Value CreateValue(NDebugger debugger, ICorDebugValue corValue) { - CorElementType type = Value.GetCorType(corValue); - - if (Value.DereferenceUnbox(corValue) == null) - { + ICorDebugValue derefed = Value.DereferenceUnbox(corValue); + if (derefed == null) { return new NullValue(debugger, corValue); } + CorElementType type = Value.GetCorType(derefed); + switch(type) { case CorElementType.BOOLEAN: