Skip to content

Commit 4737ef9

Browse files
author
Chenhe
committed
fix NPE
fix #27
1 parent c335645 commit 4737ef9

File tree

1 file changed

+1
-1
lines changed
  • app/src/main/java/cc/chenhe/qqnotifyevo/utils

1 file changed

+1
-1
lines changed

app/src/main/java/cc/chenhe/qqnotifyevo/utils/Utils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private fun getCacheDir(context: Context): File {
134134
return if (Environment.MEDIA_MOUNTED == Environment.getExternalStorageState()
135135
|| !Environment.isExternalStorageRemovable()
136136
) {
137-
context.externalCacheDir!!
137+
context.externalCacheDir ?: context.cacheDir
138138
} else {
139139
context.cacheDir
140140
}

0 commit comments

Comments
 (0)