diff --git a/app/build.gradle b/app/build.gradle index eabcc18..e09f911 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" } diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/FloodFill.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/FloodFill.kt index 227d2a2..c793a2b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/FloodFill.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/FloodFill.kt @@ -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