adding a crashfix

This commit is contained in:
tibbi 2022-12-20 10:24:09 +01:00
parent 9b8beebddb
commit bf9c5503c3
2 changed files with 2 additions and 2 deletions

View File

@ -63,6 +63,6 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:db51b86628'
implementation 'com.github.SimpleMobileTools:Simple-Commons:c72bf5f2c4'
implementation "androidx.print:print:1.0.0"
}

View File

@ -59,7 +59,7 @@ class QueueLinearFloodFiller(img: Bitmap) {
prepare()
if (startColor[0] == 0) {
// ***Get starting color.
val startPixel = pixels!![width * y + x]
val startPixel = pixels!!.getOrNull(width * y + x) ?: return
startColor[0] = startPixel shr 16 and 0xff
startColor[1] = startPixel shr 8 and 0xff
startColor[2] = startPixel and 0xff