diff options
| -rw-r--r-- | src/qmmp/statehandler.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qmmp/statehandler.cpp b/src/qmmp/statehandler.cpp index 8246fd5e0..b6a9a062f 100644 --- a/src/qmmp/statehandler.cpp +++ b/src/qmmp/statehandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2010 by Ilya Kotov * + * Copyright (C) 2008-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -31,8 +31,7 @@ StateHandler* StateHandler::m_instance = 0; StateHandler::StateHandler(QObject *parent) : QObject(parent), m_mutex(QMutex::Recursive) { - if (!m_instance) - m_instance = this; + m_instance = this; m_elapsed = -1; m_bitrate = 0; m_frequency = 0; @@ -42,14 +41,12 @@ StateHandler::StateHandler(QObject *parent) m_state = Qmmp::Stopped; m_next_engine = 0; m_current_engine = 0; - //m_mutex = QMutex(QMutex::Recursive); } StateHandler::~StateHandler() { - if (m_instance == this) - m_instance = 0; + m_instance = 0; } void StateHandler::dispatch(qint64 elapsed, |
