Skip to content

Commit b528010

Browse files
committed
Fix uninitialized variable in PlayerKartWidget
1 parent ec0202a commit b528010

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/guiengine/widgets/player_kart_widget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ PlayerKartWidget::PlayerKartWidget(KartSelectionScreen* parent,
4949
#endif
5050
m_ready_text = NULL;
5151
m_parent_screen = parent;
52+
m_left_arrow_width = 0;
5253

5354
m_associated_player = associated_player;
5455
x_speed = y_speed = w_speed = h_speed = 1.0f;
@@ -352,18 +353,18 @@ void PlayerKartWidget::add()
352353
->m_kart_widgets.contains(this));
353354
if (m_associated_player) // if player is local
354355
{
356+
#ifdef DEBUG
355357
bool mineInList = false;
356358
for (unsigned int p=0; p<StateManager::get()->activePlayerCount(); p++)
357359
{
358-
#ifdef DEBUG
359360
assert(StateManager::get()->getActivePlayer(p)->ok());
360-
#endif
361361
if (StateManager::get()->getActivePlayer(p) == m_associated_player)
362362
{
363363
mineInList = true;
364364
}
365365
}
366366
assert(mineInList);
367+
#endif
367368
}
368369

369370
// the first player will have an ID of its own to allow for keyboard

0 commit comments

Comments
 (0)