Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 84e7e3c

Browse files
committed
Fixed carousel crashing if you deleted the exiting item while scrolling (which grenade bandoliers do if you have 4+)
1 parent dfb2d3a commit 84e7e3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Menus/InventoryMenuGUI.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,9 @@ namespace RTE {
13301330
if (m_CarouselAnimationDirection != CarouselAnimationDirection::None && (m_CarouselExitingItemBox->Item || m_CarouselDrawEmptyBoxes)) {
13311331
if (m_CarouselExitingItemBox->Item) {
13321332
DrawCarouselItemBoxBackground(*m_CarouselExitingItemBox);
1333-
DrawCarouselItemBoxForeground(*m_CarouselExitingItemBox, &carouselAllegroBitmap);
1333+
if (m_CarouselExitingItemBox->Item->GetUniqueID() != 0) {
1334+
DrawCarouselItemBoxForeground(*m_CarouselExitingItemBox, &carouselAllegroBitmap);
1335+
}
13341336
} else if (m_CarouselDrawEmptyBoxes) {
13351337
DrawCarouselItemBoxBackground(*m_CarouselExitingItemBox);
13361338
m_SmallFont->DrawAligned(&carouselAllegroBitmap, m_CarouselExitingItemBox->IconCenterPosition.GetFloorIntX(), m_CarouselExitingItemBox->IconCenterPosition.GetFloorIntY() - (m_SmallFont->GetFontHeight() / 2), "Empty", GUIFont::Centre);

0 commit comments

Comments
 (0)