[Scummvm-git-logs] scummvm master -> 327c8cf693042a0f1d377444b28bcf65202d7649

grisenti noreply at scummvm.org
Sat Jul 19 13:43:20 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
327c8cf693 HPL1: fix autoload crash with no saves


Commit: 327c8cf693042a0f1d377444b28bcf65202d7649
    https://github.com/scummvm/scummvm/commit/327c8cf693042a0f1d377444b28bcf65202d7649
Author: grisenti (emanuele at grisenti.net)
Date: 2025-07-19T15:43:06+02:00

Commit Message:
HPL1: fix autoload crash with no saves

Changed paths:
    engines/hpl1/penumbra-overture/SaveHandler.cpp


diff --git a/engines/hpl1/penumbra-overture/SaveHandler.cpp b/engines/hpl1/penumbra-overture/SaveHandler.cpp
index 7cab29acace..8357bcf44bc 100644
--- a/engines/hpl1/penumbra-overture/SaveHandler.cpp
+++ b/engines/hpl1/penumbra-overture/SaveHandler.cpp
@@ -582,8 +582,10 @@ void cSaveHandler::AutoSave(const tWString &asDir, int alMaxSaves) {
 
 void cSaveHandler::AutoLoad(const tWString &asDir) {
 	tWString latestSave = GetLatest(asDir + _W(":*"));
-	LoadGameFromFile(latestSave);
-	mpInit->mpGame->ResetLogicTimer();
+	if (!latestSave.empty()) {
+		LoadGameFromFile(latestSave);
+		mpInit->mpGame->ResetLogicTimer();
+	}
 }
 
 //-----------------------------------------------------------------------




More information about the Scummvm-git-logs mailing list