messagingapp/msgappfw/utils/src/ccsdebug.cpp
branchGCC_SURGE
changeset 47 5b14749788d7
parent 25 84d9eb65b26f
parent 44 36f374c67aa8
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
    67 	else
    67 	else
    68 	{
    68 	{
    69 	  	dbgArr = static_cast<CCsDebugArr*>( Dll::Tls() );
    69 	  	dbgArr = static_cast<CCsDebugArr*>( Dll::Tls() );
    70 	}
    70 	}
    71 
    71 
    72     if ( dbgArr->IsEmpty() )
    72     if ( dbgArr && !(dbgArr->IsEmpty()) )
    73     {
       
    74         delete dbgArr;
       
    75         Dll::SetTls( NULL );
       
    76     }
       
    77     else
       
    78     {
    73     {
    79     	CCsDebug* dbg = dbgArr->Pop();
    74     	CCsDebug* dbg = dbgArr->Pop();
    80 		dbg->UnMark(str);
    75 		dbg->UnMark(str);
    81 		delete dbg;			  	
    76 		delete dbg;			  	
    82     }
    77     }
    83     
    78     
    84     if ( !dbgArr && dbgArr->IsEmpty() )
    79     if ( dbgArr && dbgArr->IsEmpty() )
    85     {
    80     {
    86         delete dbgArr;
    81         delete dbgArr;
    87         Dll::SetTls( NULL );
    82         Dll::SetTls( NULL );
    88     }
    83     }
    89 }
    84 }