From f196130d43642f2397ddadeed72e3ea062cda281 Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 24 Feb 2004 02:47:03 +0000 Subject: - check now for the storage media flag "check =" in DocumentListPrivate::appendDocpath - fixed a possible segmentation fault in DocumentListPrivate::nextFile --- diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 39dc7c9..63f853e 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp @@ -441,6 +441,10 @@ void DocumentListPrivate::appendDocpath(FileSystem*fs) } } Config conf(f.filePath(), Config::File ); + conf.setGroup("main"); + if (!conf.readBoolEntry("check",false)) { + return; + } conf.setGroup("subdirs"); bool read_all = conf.readBoolEntry("wholemedia",true); if (read_all) { @@ -560,6 +564,9 @@ const QString DocumentListPrivate::nextFile() } const QFileInfoList *fil = lists[searchDepth]; + if (!fil) { + return QString::null; + } QFileInfoList *fl = (QFileInfoList *)fil; unsigned int pos = listPositions[searchDepth]; -- cgit v0.9.0.2