summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp
index a88499d..d68a0b0 100644
--- a/util/s60pixelmetrics/pm_mapperapp.cpp
+++ b/util/s60pixelmetrics/pm_mapperapp.cpp
@@ -166,6 +166,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
else
bufferPtr.Append(_L("screen."));
ShowL( *buffer, last );
+ CleanupStack::PopAndDestroy( buffer );
}
break;
case ECmdStatus:
@@ -257,7 +258,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
bufferPtr.Append(_L("Orientation cannot be changed."));
ShowL( *buffer, last );
bufferPtr.Zero();
- delete buffer;
+ CleanupStack::PopAndDestroy( buffer );
break;
}
#endif //__SERIES60_31__
@@ -278,7 +279,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
bufferPtr.Append(_L("Orientation changed."));
ShowL( *buffer, last );
bufferPtr.Zero();
- delete buffer;
+ CleanupStack::PopAndDestroy( buffer );
break;
}
case ECmdStartCalculations:
@@ -787,11 +788,14 @@ void CPixelMetricsMapperAppUi::CreateHeaderFileL() const
CleanupStack::PopAndDestroy(); //sourceFile
}
- bufferLayoutHdr = bufferLayoutHdr.Left(bufferLayoutHdr.Length()-2);
- bufferPMData = bufferPMData.Left(bufferPMData.Length()-2);
- textFile.Write(bufferLayoutHdr);
- textFile.Write(KCRLF);
- textFile.Write(bufferPMData);
+ if (fileCount > 0)
+ {
+ bufferLayoutHdr = bufferLayoutHdr.Left(bufferLayoutHdr.Length()-2);
+ bufferPMData = bufferPMData.Left(bufferPMData.Length()-2);
+ textFile.Write(bufferLayoutHdr);
+ textFile.Write(KCRLF);
+ textFile.Write(bufferPMData);
+ }
delete dirList;
CleanupStack::PopAndDestroy(); //file