[Scummvm-git-logs] scummvm master -> 9965ee0c3ec86e522d71822922e09d91d490c938

sev- noreply at scummvm.org
Tue Apr 9 22:15:52 UTC 2024


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

Summary:
9965ee0c3e SURFACESDL: Fix crash on specifying gfx mode via command line


Commit: 9965ee0c3ec86e522d71822922e09d91d490c938
    https://github.com/scummvm/scummvm/commit/9965ee0c3ec86e522d71822922e09d91d490c938
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-04-10T00:14:11+02:00

Commit Message:
SURFACESDL: Fix crash on specifying gfx mode via command line

`./scummvm -g surfacesdl` was crashing since there is no previous
scaler

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index af58588a891..cc73f8038c4 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1520,7 +1520,8 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
 	}
 
 	// Set up the old scale factor
-	_scaler->setFactor(oldScaleFactor);
+	if (_scaler)
+		_scaler->setFactor(oldScaleFactor);
 
 	_numDirtyRects = 0;
 	_forceRedraw = false;




More information about the Scummvm-git-logs mailing list