mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
server: fix crash when favicon is not available
This commit is contained in:
parent
b8adbe8973
commit
4e9e2476f1
@ -38,7 +38,10 @@ data class Server(
|
||||
return
|
||||
}
|
||||
field = value
|
||||
faviconHash?.let { AssetsUtil.deleteAsset(it, true) }
|
||||
faviconHash?.let {
|
||||
// ToDo: Check if other server is using favicon
|
||||
AssetsUtil.deleteAsset(it, true)
|
||||
}
|
||||
if (value == null) {
|
||||
faviconHash = null
|
||||
return
|
||||
@ -60,7 +63,12 @@ data class Server(
|
||||
if (id > nextServerId) {
|
||||
nextServerId = id + 1
|
||||
}
|
||||
faviconHash?.let { favicon = AssetsUtil.readAsset(it, true) }
|
||||
try {
|
||||
faviconHash?.let { favicon = AssetsUtil.readAsset(it, true) }
|
||||
} catch (exception: Exception) {
|
||||
exception.printStackTrace()
|
||||
faviconHash = null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user