mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-10 12:04:36 -04:00
windows/util: check if failed callback exists before calling
This commit is contained in:
parent
557873db25
commit
49d423dc8c
1 changed files with 6 additions and 2 deletions
|
@ -131,7 +131,9 @@ void file::pickFile(
|
|||
if (result.isOk()) {
|
||||
callback(std::move(result.unwrap()));
|
||||
} else {
|
||||
failed();
|
||||
if (failed) {
|
||||
failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
Task<Result<ghc::filesystem::path>> file::pick(PickMode mode, FilePickOptions const& options) {
|
||||
|
@ -156,7 +158,9 @@ void file::pickFiles(
|
|||
if (result.isOk()) {
|
||||
callback(std::move(result.unwrap()));
|
||||
} else {
|
||||
failed();
|
||||
if (failed) {
|
||||
failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
Task<Result<std::vector<ghc::filesystem::path>>> file::pickMany(FilePickOptions const& options) {
|
||||
|
|
Loading…
Add table
Reference in a new issue