adding a crashfix
This commit is contained in:
parent
9b8beebddb
commit
bf9c5503c3
|
@ -63,6 +63,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:db51b86628'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:c72bf5f2c4'
|
||||||
implementation "androidx.print:print:1.0.0"
|
implementation "androidx.print:print:1.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ class QueueLinearFloodFiller(img: Bitmap) {
|
||||||
prepare()
|
prepare()
|
||||||
if (startColor[0] == 0) {
|
if (startColor[0] == 0) {
|
||||||
// ***Get starting color.
|
// ***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[0] = startPixel shr 16 and 0xff
|
||||||
startColor[1] = startPixel shr 8 and 0xff
|
startColor[1] = startPixel shr 8 and 0xff
|
||||||
startColor[2] = startPixel and 0xff
|
startColor[2] = startPixel and 0xff
|
||||||
|
|
Loading…
Reference in New Issue