GCC15 fix in ReplayManager.cpp (#24707)

```
In member function ‘bool OpenRCT2::ReplayManager::SerialiseCommand(DataSerialiser&, OpenRCT2::ReplayCommand&)’,
    inlined from ‘bool OpenRCT2::ReplayManager::Serialise(DataSerialiser&, OpenRCT2::ReplayRecordData&)’ at /home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:778:37:
/home/janisozaur/workspace/openrct2/src/openrct2/ReplayManager.cpp:719:38: error: potential null pointer dereference [-Werror=null-dereference]
  719 |             command.action->Serialise(serialiser);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```

```
$ gcc --version
gcc (GCC) 15.1.1 20250425
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
This commit is contained in:
Michał Janiszewski authored and GitHub committed 2025-07-01 11:15:09 +00:00
1 parent 1826c8bcd2
commit 9747c27664
1 file changed
+1 -1
+1 -1
View File
@@ -713,9 +713,9 @@ namespace OpenRCT2
if (serialiser.IsLoading())
{
command.action = GameActions::Create(static_cast<GameCommand>(actionType));
Guard::Assert(command.action != nullptr);
}
Guard::Assert(command.action != nullptr);
command.action->Serialise(serialiser);
return true;