summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app_console/app_console.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp
index 80b8a856..95b8881e 100644
--- a/src/app_console/app_console.cpp
+++ b/src/app_console/app_console.cpp
@@ -27,6 +27,12 @@ int CmdListDir(int argc, char** argv) {
return 1;
}
+ auto lock = sInstance->database_.lock();
+ if (lock == nullptr) {
+ std::cout << "storage is not available" << std::endl;
+ return 1;
+ }
+
std::string path;
if (argc == 2) {
path = toSdPath(argv[1]);