From d99e0c58ba8953ac3895b6c04450ee020f8b1353 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Sep 2023 04:04:36 +0000 Subject: [PATCH] 3.4.3 (51572) --- .../AddOns/Blizzard_Collections/Blizzard_PetCollection.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Interface/AddOns/Blizzard_Collections/Blizzard_PetCollection.lua b/Interface/AddOns/Blizzard_Collections/Blizzard_PetCollection.lua index 0078f9dca..24a7cc6e6 100644 --- a/Interface/AddOns/Blizzard_Collections/Blizzard_PetCollection.lua +++ b/Interface/AddOns/Blizzard_Collections/Blizzard_PetCollection.lua @@ -115,9 +115,7 @@ function PetJournal_UpdateSummonButtonState() PetJournal.SummonButton:SetEnabled(hasPetID and (C_PetJournal.PetIsSummonable(petID) or needsFanfare)); - local active = C_PetJournal.IsCurrentlySummoned(petID); - - if hasPetID and active then + if hasPetID and C_PetJournal.IsCurrentlySummoned(petID) then PetJournal.SummonButton:SetText(PET_DISMISS); elseif needsFanfare then PetJournal.SummonButton:SetText(UNWRAP); @@ -809,7 +807,7 @@ function PetJournalSummonButton_OnEnter(self) end function PetJournalSummonButton_OnClick(self) - local active = C_PetJournal.IsCurrentlySummoned(PetJournalPetCard.petID); + local active = PetJournalPetCard.petID and C_PetJournal.IsCurrentlySummoned(PetJournalPetCard.petID); if ( active ) then C_PetJournal.DismissSummonedPet(PetJournalPetCard.petID); PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);