--- a/commands/ping/pingmodel.cpp Fri Nov 05 11:46:32 2010 +0000
+++ b/commands/ping/pingmodel.cpp Sat Nov 06 16:46:13 2010 +0000
@@ -764,6 +764,7 @@
delete iPacketData;
+ iPacketData = NULL;
iPacketData= HBufC8::NewL(iPacketDataSize + ICMP_HDRLEN);
//Allocates space for the ICMP packet
TPtr8 aux(iPacketData->Des()); //weird but necessary. Cannot use Des() directly in iPacket
@@ -774,6 +775,7 @@
delete iReceivedDataBuffer;
+ iReceivedDataBuffer = NULL;
iReceivedDataBuffer= HBufC8::NewL(iPacketDataSize + ICMP_ECHO_HEADER_SIZE); //Maximum size of a return packet
TPtr8 auxPtr(iReceivedDataBuffer->Des()); //must be used here because the buffer changes
iReceivedData.Set(auxPtr); //we use an aux var because can't use Des() directly Why??