[Question] What is wrong with code?

void JustDied(Unit* /killer/) override
{
if (Creature* living = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_Living_Inferno))){
if (living->IsAlive()){
me->SummonGameObject(GO_BONUS_LOOT_RAG, 855.184998f, -845.518860f, -228.481445f, 1.996155f, 0.0f, 0.0f, 0.0f, 0.0f, 70000);
}
}
}

I want code for when living inferno is alive and the boss dies to spawn extra chest at that location. Anyone know problem?