From 91f0d0eb319e3d3be36ac7cb51769bd94c1db3b9 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 22 Nov 2024 06:45:51 +0100 Subject: [PATCH] Fixed crash when unit is null --- KittieCats/source/ComplicationSubscriber.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KittieCats/source/ComplicationSubscriber.mc b/KittieCats/source/ComplicationSubscriber.mc index f20159e..7d3b0aa 100644 --- a/KittieCats/source/ComplicationSubscriber.mc +++ b/KittieCats/source/ComplicationSubscriber.mc @@ -89,7 +89,7 @@ class ComplicationSubscriber case self.stepsComplicationId: { - self.steps = complication.unit.equals("K") ? Math.floor(complicationValue * 1000) : complicationValue; + self.steps = complication.unit != null && complication.unit.equals("K") ? Math.floor(complicationValue * 1000) : complicationValue; break; }