diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-05-24 07:17:42 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-05-24 07:17:42 +1000 |
| commit | 876e5e70e93e3031e2acb32ddedc3b262d737ded (patch) | |
| tree | 10daaad1eb3a14ce7a7b252f59b2c81e41da1b7e /src | |
| parent | ebcdf939305879c7061d77fe3cc5cbbd14a3853f (diff) | |
| download | tangara-fw-876e5e70e93e3031e2acb32ddedc3b262d737ded.tar.gz | |
Don't crash if there's no sd card
Diffstat (limited to 'src')
| -rw-r--r-- | src/app_console/app_console.cpp | 6 |
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]); |
