Fix memory watching with project active

This commit is contained in:
Ilari Liusvaara 2013-05-13 20:10:41 +03:00
parent 6c77539a93
commit c366723065

View file

@ -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));
}