author | alwin <alwin> | 2004-04-21 22:57:53 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-21 22:57:53 (UTC) |
commit | 15abdc3ac4e7406d15a8a59f43b3ae669099074a (patch) (side-by-side diff) | |
tree | 2ed419f8edf698561359f46dfbf177767f974452 /noncore/graphics/opie-eye/slave | |
parent | 2a04bf465c332f5e879470f7436852e2d9686083 (diff) | |
download | opie-15abdc3ac4e7406d15a8a59f43b3ae669099074a.zip opie-15abdc3ac4e7406d15a8a59f43b3ae669099074a.tar.gz opie-15abdc3ac4e7406d15a8a59f43b3ae669099074a.tar.bz2 |
fixed a possible crasher
Diffstat (limited to 'noncore/graphics/opie-eye/slave') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/slave/png_slave.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/slave/png_slave.cpp b/noncore/graphics/opie-eye/slave/png_slave.cpp index 86e1cdc..21555b4 100644 --- a/noncore/graphics/opie-eye/slave/png_slave.cpp +++ b/noncore/graphics/opie-eye/slave/png_slave.cpp @@ -63,13 +63,14 @@ static const char* interlaceModes[] = { }; static void read_comment( const QString& inf, bool readComments, QString& str ) { QFile f(inf); - f.open(IO_ReadOnly); + if (!f.exists()) return; + if (!f.open(IO_ReadOnly)) return; if (f.size() < 26) return; // the technical group will be read from the first 26 bytes. If the file // is smaller, we can't even read this. uchar *data = new uchar[f.size()+1]; |