fix: colour related out of bounds crashes
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
2f435fb7e8
commit
879ddf03d6
|
|
@ -223,6 +223,10 @@ object BrushCompat {
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun parseColour(colour: String): Brush {
|
fun parseColour(colour: String): Brush {
|
||||||
|
if (colour.isEmpty()) {
|
||||||
|
return Brush.solidColor(Color.Unspecified)
|
||||||
|
}
|
||||||
|
|
||||||
when {
|
when {
|
||||||
colour.startsWith("var(") -> {
|
colour.startsWith("var(") -> {
|
||||||
Log.d(
|
Log.d(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue