aboutsummaryrefslogtreecommitdiff
path: root/gui/launcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r--gui/launcher.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index af7f67d997..86e8ad926b 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -576,7 +576,11 @@ void LauncherDialog::addGame() {
if (_browser->runModal() > 0) {
// User made his choice...
FilesystemNode dir(_browser->getResult());
- FSList files = dir.listDir(FilesystemNode::kListAll);
+ FSList files;
+ if (!dir.listDir(files, FilesystemNode::kListAll)) {
+ error("browser returned a node that is not a directory: '%s'",
+ dir.path().c_str());
+ }
// ...so let's determine a list of candidates, games that
// could be contained in the specified directory.