summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index b1eeab1bd..0672ac209 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -874,7 +874,7 @@ static void RemoveFromConsist(Train *part, bool chain = false)
static void InsertInConsist(Train *dst, Train *chain)
{
/* We do not want to add something in the middle of an articulated part. */
- assert(dst->Next() == NULL || !dst->Next()->IsArticulatedPart());
+ assert(dst != NULL && (dst->Next() == NULL || !dst->Next()->IsArticulatedPart()));
chain->Last()->SetNext(dst->Next());
dst->SetNext(chain);