mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
avoid fetching files at a destroyed MainActivity
This commit is contained in:
parent
0cfcba6c8f
commit
02bc49a259
1 changed files with 2 additions and 2 deletions
|
@ -899,7 +899,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (directory in dirs) {
|
for (directory in dirs) {
|
||||||
if (mShouldStopFetching) {
|
if (mShouldStopFetching || isDestroyed || isFinishing) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -972,7 +972,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
// check the remaining folders which were not cached at all yet
|
// check the remaining folders which were not cached at all yet
|
||||||
for (folder in foldersToScan) {
|
for (folder in foldersToScan) {
|
||||||
if (mShouldStopFetching) {
|
if (mShouldStopFetching || isDestroyed || isFinishing) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue