diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-18 10:49:47 -0200 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-18 12:55:08 -0300 |
commit | 890cf26e0a67f2fa2b2312c1a09a6ed9e9cb4294 (patch) | |
tree | 11773598e5e47024009f8f036ad23e979b354569 /fileout.cpp | |
parent | eb99fbe68dcd618818858a409238b36404af94f2 (diff) |
Do not attempt to write/read a file when the file name is a empty string.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'fileout.cpp')
-rw-r--r-- | fileout.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fileout.cpp b/fileout.cpp index ac5206bd6..7beb74dcf 100644 --- a/fileout.cpp +++ b/fileout.cpp @@ -170,6 +170,9 @@ static void diff(QList<QByteArray> a, QList<QByteArray> b) bool FileOut::done() { Q_ASSERT(!isDone); + if (name.isEmpty()) + return false; + isDone = true; bool fileEqual = false; QFile fileRead(name); |