diff options
Diffstat (limited to 'boblightservice.c')
-rw-r--r-- | boblightservice.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boblightservice.c b/boblightservice.c index c3c52c3..e8e289c 100644 --- a/boblightservice.c +++ b/boblightservice.c @@ -56,9 +56,11 @@ int cBoblight::open() int cBoblight::close() { - tell(1, "Destroying boblight"); - boblight_destroy(m_boblight); // calls delete *void - m_boblight = 0; // set pointer to 0 + if(m_boblight != 0) { + tell(1, "Destroying boblight"); + boblight_destroy(m_boblight); // calls delete *void + m_boblight = 0; + } // set pointer to 0 return success; } |