diff options
author | Philip Lorenz <philip.lorenz@bmw-carit.de> | 2013-11-04 15:48:07 +0100 |
---|---|---|
committer | Philip Lorenz <philip.lorenz@bmw-carit.de> | 2015-03-12 16:11:00 +0100 |
commit | 76089cd603e4c36d7365e83ebf7a997430b4fa78 (patch) | |
tree | 6af3f4177438bc877e73ae30d996443d2baa2bb4 | |
parent | 43899c1bdf3edd19d6b06c8d3f8b7f5a63e14a82 (diff) | |
download | audiomanager-76089cd603e4c36d7365e83ebf7a997430b4fa78.tar.gz |
Do not store handle before it is initialised
handle is only set by ::addTimer so do not store its value by copy
before it is actually set.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw-carit.de>
-rw-r--r-- | AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp b/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp index 46aa004..fbd4d4a 100644 --- a/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp +++ b/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp @@ -225,12 +225,13 @@ void CAmCommonAPIWrapper::registerTimeout(Timeout* timeout, const DispatchPriori //prepare handle and callback. new is eval, but there is no other choice because we need the pointer! sh_timerHandle_t handle; - timerHandles myHandle({handle,timeout}); - mpListTimerhandles.push_back(myHandle); //add the timer to the pollLoop mpSocketHandler->addTimer(pollTimeout, &pCommonTimerCallback, handle, timeout); + timerHandles myHandle({handle,timeout}); + mpListTimerhandles.push_back(myHandle); + return; } |