diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index 0b58a6954c..4e1bfacafd 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -515,10 +515,19 @@ private: void _CompareValues() { fValueChanged = false; - if (fValue != NULL && fPreviousValue.Type() != 0) { - BVariant newValue; - fValue->ToVariant(newValue); - fValueChanged = (fPreviousValue != newValue); + if (fValue != NULL) { + if (fPreviousValue.Type() != 0) { + BVariant newValue; + fValue->ToVariant(newValue); + fValueChanged = (fPreviousValue != newValue); + } else { + // for expression variables, always consider the initial + // value as changed, since their evaluation has just been + // requested, and thus their initial value is by definition + // new/of interest + fValueChanged = dynamic_cast( + fVariable->ID()) != NULL; + } } }