diff --git a/src/p_user.c b/src/p_user.c
index 0861398d671a00fdfd777fc3bc04ddb4c1804dd5..b74cafd2180b28951d65145c081d9670095f3f34 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -10391,7 +10391,7 @@ static void P_MinecartThink(player_t *player)
 	if (P_IsObjectOnGround(minecart))
 	{
 		sector_t *sec;
-		INT32 lnum;
+		INT32 lnum = -1;
 		fixed_t dummy;
 
 		// Just hit floor.