Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4368db71 authored by Jernej Virag's avatar Jernej Virag
Browse files

Fix crash due to broken preconditions

It seems like the assumption that non-nullables won't be null is not true.
This changes crash to Log.wtf to avoid breaking things until we figure it out.

Bug: 316894437
Flag: NONE
Test: not practical at this time
Change-Id: I846c622c783a1cd0769b6ad1f84765c6b7144a31
parent 96bbd316
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -142,6 +142,11 @@ class PreviewLifecycleObserver(
            return true
        }

        if (renderer == null || onDestroy == null) {
            Log.wtf(TAG, "Renderer/onDestroy should not be null.")
            return true
        }

        when (message.what) {
            KeyguardPreviewConstants.MESSAGE_ID_SLOT_SELECTED -> {
                message.data.getString(KeyguardPreviewConstants.KEY_SLOT_ID)?.let { slotId ->