Skip to content

Commit

Permalink
Merge pull request #48 from DisgoOrg/fix/possible-npe
Browse files Browse the repository at this point in the history
NPE Fix
  • Loading branch information
Skye-31 authored Jul 3, 2021
2 parents 35723f6 + 76cff18 commit 97fc1e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/handlers/guild_delete_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ func (h GuildDeleteHandler) HandleGatewayEvent(disgo api.Disgo, eventManager api

if guild.Unavailable {
// set guild to unavailable for now
disgo.Cache().Guild(guild.ID).Unavailable = true
g := disgo.Cache().Guild(guild.ID)
if g != nil {
g.Unavailable = true
}

eventManager.Dispatch(events.GuildUnavailableEvent{
GenericGuildEvent: genericGuildEvent,
Expand Down

0 comments on commit 97fc1e4

Please sign in to comment.