summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comIvy/Bus.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/comIvy/Bus.cpp b/comIvy/Bus.cpp
index 66f2f2c..355661f 100644
--- a/comIvy/Bus.cpp
+++ b/comIvy/Bus.cpp
@@ -35,7 +35,11 @@ CBus::CBus()
}
CBus::~CBus()
{
- delete bus;
+ if ( bus )
+ {
+ bus->stop();
+ delete bus;
+ }
bus = NULL;
ATLTRACE("CBus destroyed\n");
}
@@ -46,7 +50,7 @@ STDMETHODIMP CBus::Start(BSTR domain)
if ( !bus ) return E_FAIL;
if ( SysStringLen( domain ) )
strdomain= ConvBSTR(domain);
- if ( bus ) bus->start(strdomain);
+ bus->start(strdomain);
delete strdomain;
return S_OK;
}