mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 01:30:17 +08:00
Fixed a issue that cause bot initialization failed on headless platform
This commit is contained in:
parent
04185672f1
commit
4eb5c8615b
@ -49,11 +49,15 @@ class DefaultLoginSolver(
|
||||
}
|
||||
|
||||
tempFile.inputStream().use {
|
||||
val img = ImageIO.read(it)
|
||||
if (img == null) {
|
||||
logger.info("无法创建字符图片. 请查看文件")
|
||||
} else {
|
||||
logger.info(img.createCharImg())
|
||||
try {
|
||||
val img = ImageIO.read(it)
|
||||
if (img == null) {
|
||||
logger.info("无法创建字符图片. 请查看文件")
|
||||
} else {
|
||||
logger.info(img.createCharImg())
|
||||
}
|
||||
} catch (throwable: Throwable) {
|
||||
logger.info("创建字符图片时出错(${throwable.toString()})。请查看文件")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user