diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2018-10-27 18:13:42 +0100 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-10-31 12:41:49 +0100 |
commit | bb7353c02afd7ff04c4a71cc2b114ed8a6136994 (patch) | |
tree | dba608b5d6b84ed30a90a7d9f46c8f565c4efb8d /src/train_cmd.cpp | |
parent | 1778b2d66ec21e544e56e5aaaee816cf8fc955af (diff) | |
download | openttd-bb7353c02afd7ff04c4a71cc2b114ed8a6136994.tar.xz |
Codechange: Some more null checks
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 2 |
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); |