From 0c3de1fa005a518c9efb37c334b4ff0079d28f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 10 Oct 2020 19:49:33 +0200 Subject: [PATCH] Fix potential nullptr dereference (#13149) This fixes optimised builds on ARM --- src/openrct2/ReplayManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index 15945702c1..cd451b32cf 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -691,6 +691,10 @@ namespace OpenRCT2 uint32_t actionType = 0; if (serialiser.IsSaving()) { + if (!command.action) + { + return false; + } actionType = command.action->GetType(); } serialiser << actionType;