Skip to content

Commit

Permalink
Fix NPE when cloning guild role with null icon (v5) (#2063)
Browse files Browse the repository at this point in the history
Co-authored-by: Hexillium <oliver276@users.noreply.github.com>
  • Loading branch information
Tais993 and oliver276 authored Mar 23, 2022
1 parent 8cbc267 commit 19e2b55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public RoleAction createCopy(@Nonnull Guild guild)
.setMentionable(mentionable)
.setName(name)
.setPermissions(rawPermissions)
.setIcon(icon.getEmoji()); // we can only copy the emoji as we don't have access to the Icon instance
.setIcon(icon == null ? null : icon.getEmoji()); // we can only copy the emoji as we don't have access to the Icon instance
}

@Nonnull
Expand Down

0 comments on commit 19e2b55

Please sign in to comment.