bluetoothengine/bteng/src/btengserver.cpp
changeset 25 9c3798b88e30
parent 23 988cddd6adbd
child 16 b23265fb36da
--- a/bluetoothengine/bteng/src/btengserver.cpp	Fri Apr 23 23:54:40 2010 +0300
+++ b/bluetoothengine/bteng/src/btengserver.cpp	Sat Apr 24 00:12:05 2010 +0300
@@ -335,6 +335,7 @@
 void CBTEngServer::QueueTimer( CBTEngServer::TTimerQueued aTimer, TInt64 aInterval )
     {
     TRACE_FUNC_ARG( ( _L( "queueing timer %d" ), (TInt) aTimer ) )
+    __ASSERT_DEBUG( iTimer, PanicServer( EBTEngPanicMemberVarIsNull ) );
     iTimerQueued |= aTimer;
     TTimeIntervalMicroSeconds interval( aInterval );
     switch( aTimer )
@@ -364,6 +365,10 @@
 void CBTEngServer::RemoveTimer( CBTEngServer::TTimerQueued aTimer )
     {
     TRACE_FUNC_ARG( ( _L( "removing timer %d" ), (TInt) aTimer ) )
+    if(!iTimer)
+        {
+        return; // not fully constructed yet, don't do anything
+        }
     iTimerQueued &= ~aTimer;
     // Timers can be removed without being queued, no need to check.
     switch( aTimer )