From c366723065f9e0f058dbb61dbb8b2d4e79dc2df3 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Mon, 13 May 2013 20:10:41 +0300 Subject: [PATCH] Fix memory watching with project active --- src/core/memorywatch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/memorywatch.cpp b/src/core/memorywatch.cpp index 98c89c1d..59687ac9 100644 --- a/src/core/memorywatch.cpp +++ b/src/core/memorywatch.cpp @@ -419,7 +419,9 @@ void set_watchexpr_for(const std::string& w, const std::string& expr) throw(std: void do_watch_memory() { auto& status = platform::get_emustatus(); - for(auto i : watches) + auto p = project_get(); + auto w = p ? &(p->watches) : &watches; + for(auto i : *w) status.set("M[" + i.first + "]", evaluate_watch(i.second)); }