<Retrieving a boolean from another activity causes...
# stackoverflow
u
Retrieving a boolean from another activity causes a NullPointerException (Kotlin) As I said in the title, I'm trying to retrieve a boolean from the intent. This is what I send
Copy code
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main_menu)

    resetButton = findViewById(R.id.buttonReset)

    resetButton.setOnClickListener {

        var intent = Intent(this@MainMenu, MainActivity::class.java)

        intent.putExtra("isReset", true)
        startActivity(intent)
    }
and this is the variable...