mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Resolve #9435 - don't crash for ByteBuffer byte errors
This commit is contained in:
parent
b3166c4922
commit
472bb55b40
@ -262,7 +262,7 @@ object Github {
|
|||||||
val byteArray = file.readBytes()
|
val byteArray = file.readBytes()
|
||||||
val buffer = ByteBuffer.allocateDirect(byteArray.size).put(byteArray).position(0)
|
val buffer = ByteBuffer.allocateDirect(byteArray.size).put(byteArray).position(0)
|
||||||
return Pixmap(buffer)
|
return Pixmap(buffer)
|
||||||
} catch (ex: Exception) {
|
} catch (_: Throwable) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user