summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/systrace.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2009-08-29 18:55:52 +0000
committerDominik Wenger <domonoky@googlemail.com>2009-08-29 18:55:52 +0000
commit6fd6adbc4414e05ec73003c9ffb662c9ad000d57 (patch)
tree0b621e437df25b1b8e39e3077b161f6ff803becb /rbutil/rbutilqt/systrace.cpp
parent7aec70f3679a0afb18dc3ea9d1fdb9397a21889d (diff)
downloadrockbox-6fd6adbc4414e05ec73003c9ffb662c9ad000d57.tar.gz
rockbox-6fd6adbc4414e05ec73003c9ffb662c9ad000d57.tar.bz2
rockbox-6fd6adbc4414e05ec73003c9ffb662c9ad000d57.zip
rbutil: dont write logfile if user aborts filename selection.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22544 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/systrace.cpp')
-rw-r--r--rbutil/rbutilqt/systrace.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/systrace.cpp b/rbutil/rbutilqt/systrace.cpp
index 42babfe2f8..21b4a1f93b 100644
--- a/rbutil/rbutilqt/systrace.cpp
+++ b/rbutil/rbutilqt/systrace.cpp
@@ -46,9 +46,12 @@ void SysTrace::save(void)
{
QString fp = QFileDialog::getSaveFileName(this, tr("Save system trace log"),
QDir::homePath(), "*.log");
-
+ if(fp == "")
+ return;
+
QFile fh(fp);
- fh.open(QIODevice::WriteOnly);
+ if(!fh.open(QIODevice::WriteOnly))
+ return;
fh.write(debugbuffer.toUtf8(), debugbuffer.size());
fh.close();
}