textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp
branchRCL_3
changeset 11 c8fb4cf7b3ae
parent 5 a47de9135b21
--- a/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp	Tue Apr 27 16:59:43 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputdropdownlist/peninputdropdownlist.cpp	Tue May 11 16:31:42 2010 +0300
@@ -2272,18 +2272,20 @@
 		    
         if((TBidiText::TextDirectionality(aText) == TBidiText:: ERightToLeft) && (aText.Length() > 1))
           {
-          HBufC* displayStr = aText.AllocLC();
-         
-          TInt i = 0;
-          TInt charNum = displayStr->Length();
-         
-          while(i < charNum)
-              {
-              displayStr->Des()[i] = aText[(charNum-1)-i];
-              ++i;
-              }
-           TRAP_IGNORE(iBubbleCtrl->SetTextL(*displayStr));     
-           CleanupStack::PopAndDestroy(displayStr);
+       
+              HBufC* displayStr = aText.Alloc();			 
+			  TInt i = 0;
+			  TInt charNum = displayStr->Length();
+			 
+			  while(i < charNum)
+				  {
+				  displayStr->Des()[i] = aText[(charNum-1)-i];
+				  ++i;
+				  }
+			   TRAP_IGNORE(iBubbleCtrl->SetTextL(*displayStr)); 
+			   
+			   delete displayStr;
+        
           }
        else
           {