libraries/qr3/src/keycapture.cpp
changeset 86 56b6ee983610
parent 0 7f656887cf89
--- a/libraries/qr3/src/keycapture.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/qr3/src/keycapture.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -271,14 +271,20 @@
 	{
 	Cancel();
 
-	for (TInt i = 0; i < iCaptures->Count(); i++)
+	if (iCaptures)
 		{
-		SCapture& cap = iCaptures->operator[](i);
-		CancelCapture(cap);
+		for (TInt i = 0; i < iCaptures->Count(); i++)
+			{
+			SCapture& cap = iCaptures->operator[](i);
+			CancelCapture(cap);
+			}
+		delete iCaptures;
 		}
-	delete iCaptures;
-	iPushList->ResetAndDestroy();
-	delete iPushList;
+	if (iPushList)
+		{
+		iPushList->ResetAndDestroy();
+		delete iPushList;
+		}
 #ifdef FSHELL_WSERV_SUPPORT
 	iWg.Close();
 	iWs.Close();