Fix #12685: nullptr dereference when checking for equal loaded/loading groups. (...
commitf62eb72fcbe76f0afe657244ee0fba98c5f6c0e2
authorPeter Nelson <peter1138@openttd.org>
Sat, 18 May 2024 08:17:06 +0000 (18 09:17 +0100)
committerJonathan G Rennison <j.g.rennison@gmail.com>
Sun, 19 May 2024 16:36:12 +0000 (19 17:36 +0100)
tree6bc65cc22973b073e2597cf8d8be751fc249ebc2
parent3df3ed66903e6bddfaf0d66b60484a49f0ade1f5
Fix #12685: nullptr dereference when checking for equal loaded/loading groups. (#12686)

Always treat empty groups as non-equal. Given that the case of both being empty is handled earlier, they cannot both be equal and empty.

Additionally if a loaded or loading set are all the same, only add one reference.

(cherry picked from commit 856ec901ca9523812b16e367b49d2baf4a28d26b)
src/newgrf.cpp