aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-06 18:39:34 -0400
committerZach Hilman <zachhilman@gmail.com>2019-06-24 20:05:11 -0400
commit73dcb13619fc6603be628a7eea275ea02818c1ce (patch)
tree8812635bfd61575c5827ac18ed5f4b8b12b30f64 /src
parentd018ac2c605f99c825971ee4156e643b02f618e7 (diff)
web_browser: Only delete temporary directory if it was created
Prevents crashes with ShopN applet occasionally.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/applets/web_browser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/am/applets/web_browser.cpp b/src/core/hle/service/am/applets/web_browser.cpp
index 58efebf06a..3c3af476c4 100644
--- a/src/core/hle/service/am/applets/web_browser.cpp
+++ b/src/core/hle/service/am/applets/web_browser.cpp
@@ -285,7 +285,9 @@ void WebBrowser::Finalize() {
broker.PushNormalDataFromApplet(IStorage{data});
broker.SignalStateChanged();
- FileUtil::DeleteDirRecursively(temporary_dir);
+ if (!temporary_dir.empty() && FileUtil::IsDirectory(temporary_dir)) {
+ FileUtil::DeleteDirRecursively(temporary_dir);
+ }
}
void WebBrowser::InitializeInternal() {