From 94872b8abd5f50f31d6b5f292ae0a8741a9064d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 14 Aug 2010 18:32:38 +0200 Subject: [PATCH] A bit of checking in some places. --- library/DFContext.cpp | 1 - library/modules/Maps.cpp | 1 - tools/examples/processenum.cpp | 8 +++++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/library/DFContext.cpp b/library/DFContext.cpp index 1499f566d..d46302426 100644 --- a/library/DFContext.cpp +++ b/library/DFContext.cpp @@ -59,7 +59,6 @@ Context::Context (Process* p) : d (new DFContextShared()) Context::~Context() { - cerr << "called Context destructor" << endl; Detach(); delete d; } diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp index 17c6c2034..0cf3588a1 100644 --- a/library/modules/Maps.cpp +++ b/library/modules/Maps.cpp @@ -123,7 +123,6 @@ Maps::Maps(DFContextShared* _d) Maps::~Maps() { - cerr << "called Maps destructor" << endl; if(d->Started) Finish(); delete d; diff --git a/tools/examples/processenum.cpp b/tools/examples/processenum.cpp index 728736b65..745e94371 100644 --- a/tools/examples/processenum.cpp +++ b/tools/examples/processenum.cpp @@ -106,7 +106,13 @@ int main (void) if(cont) { if(cont->Attach()) - cont->getMaps(); + { + DFHack::Maps * mapz = cont->getMaps(); + cont->Suspend(); + mapz->Start(); + cont->Resume(); + } + bool result = cont->Detach(); if(!result) {