usbuis/usbuinotif/src/usbuinotifotgerror.cpp
changeset 46 0ffee699d6c7
parent 3 47c263f7e521
child 47 878846f7623e
--- a/usbuis/usbuinotif/src/usbuinotifotgerror.cpp	Fri Apr 23 23:42:54 2010 +0300
+++ b/usbuis/usbuinotif/src/usbuinotifotgerror.cpp	Fri Apr 23 23:57:55 2010 +0300
@@ -105,18 +105,24 @@
         {
         User::Leave( KErrInUse );
         }
-
-    iMessage = aMessage;
-    iNeedToCompleteMessage = ETrue;
-    iReplySlot = aReplySlot;
-
+        
     // Get parameters 
     //
-    iErrorId = 0;
+    
     TPckgC<TInt> pckg( iErrorId );
     pckg.Set( aBuffer );
     iErrorId = pckg();
-
+    
+    FTRACE(FPrint(_L("[USBUINOTIF]\t CUsbUiNotifOtgError::GetParamsL iErrorId: %d"), iErrorId ));  
+    if ( iErrorId < 0 || iErrorId >= iStringIds.Count() )
+        {        
+        User::Leave( KErrArgument);        
+        }    
+        
+    iMessage = aMessage;
+    iNeedToCompleteMessage = ETrue;
+    iReplySlot = aReplySlot;  
+	  
     SetActive();
     iStatus = KRequestPending;
     TRequestStatus* stat = &iStatus;