emailuis/emailui/src/ncsheadercontainer.cpp
branchRCL_3
changeset 11 0396474f30f5
parent 10 f5907b1a1053
child 12 4ce476e64c59
--- a/emailuis/emailui/src/ncsheadercontainer.cpp	Fri Mar 12 15:41:14 2010 +0200
+++ b/emailuis/emailui/src/ncsheadercontainer.cpp	Mon Mar 15 12:39:10 2010 +0200
@@ -1094,10 +1094,14 @@
 	
 	MNcsControl* ncsCtrl = dynamic_cast<MNcsControl*>( coe );
 	// This will give the the position relative to the top of the control
-	TInt pos = ncsCtrl->CursorPosition();
-	// add the location of the top of the control relative to the top
-	// of the header.
-	pos += coe->Rect().iTl.iY - Rect().iTl.iY;
+	TInt pos(0); // Coverity error fix ncsCtrl could be NULL
+	if(ncsCtrl)
+	    {
+        pos = ncsCtrl->CursorPosition();
+        // add the location of the top of the control relative to the top
+        // of the header.
+        pos += coe->Rect().iTl.iY - Rect().iTl.iY;
+	    }
 	return pos;
 	}