[Scummvm-git-logs] scummvm master -> b64008722ca7b9da01926e31b6c79f06fb4adddf

lephilousophe noreply at scummvm.org
Sun Feb 1 16:07:16 UTC 2026


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:
b64008722c ANDROID: Avoid crash when restarting the app quickly


Commit: b64008722ca7b9da01926e31b6c79f06fb4adddf
    https://github.com/scummvm/scummvm/commit/b64008722ca7b9da01926e31b6c79f06fb4adddf
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2026-02-01T17:06:53+01:00

Commit Message:
ANDROID: Avoid crash when restarting the app quickly

When restarting the app quickly after quitting, we may get destroy
events while we already created a new surface: this causes the screen
size to become 0 although it is valid.

Changed paths:
    backends/platform/android/org/scummvm/scummvm/ScummVM.java


diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVM.java b/backends/platform/android/org/scummvm/scummvm/ScummVM.java
index d38ec28f6e6..4cbb498a9c2 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVM.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVM.java
@@ -150,8 +150,12 @@ public abstract class ScummVM implements SurfaceHolder.Callback,
 			_sem_surface.notifyAll();
 		}
 
-		// clear values for the native code
-		setSurface(0, 0, 0);
+		// Don't call when EGL is not init:
+		// this avoids polluting the static variables with obsolete values
+		if (_egl != null) {
+			// clear values for the native code
+			setSurface(0, 0, 0);
+		}
 	}
 
 	final public void setAssetsUpdated(boolean assetsUpdated) {




More information about the Scummvm-git-logs mailing list