Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dontcrash #10525

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Dontcrash #10525

merged 3 commits into from
Dec 11, 2024

Conversation

Raycoms
Copy link
Contributor

@Raycoms Raycoms commented Dec 11, 2024

Closes #
Closes #

Changes proposed in this pull request

  • Dont crash with empty stack, but log error so we can find origin more easily. Better log spam than exceptions

Testing

  • Yes I tested this before submitting it.
  • I also did a multiplayer test.

Review please

@@ -59,7 +60,7 @@ public AbstractCrafting(@NotNull final ItemStack stack, final int count, final i

if (ItemStackUtils.isEmpty(stack))
{
throw new IllegalArgumentException("Cannot deliver Empty Stack.");
Log.getLogger().error("Created Empty Stack", new Exception());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should return here to prevent setting the size on the empty staack below

@Raycoms Raycoms merged commit 102dc51 into version/main Dec 11, 2024
5 checks passed
@Raycoms Raycoms deleted the dontcrash branch December 11, 2024 19:03
Raycoms added a commit that referenced this pull request Dec 23, 2024
Dont crash with empty stack, but log error so we can find origin more easily. Better log spam than exceptions
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants