From bf9c5503c3a86380dd7603bc6468a51a21f9c0d0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 20 Dec 2022 10:24:09 +0100 Subject: [PATCH] adding a crashfix --- app/build.gradle | 2 +- .../kotlin/com/simplemobiletools/draw/pro/helpers/FloodFill.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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