[Scummvm-git-logs] scummvm branch-2-7-0-android -> 9a6a9a3c4cfb4b6c904a659a1ed3577387fe2ba9

lephilousophe noreply at scummvm.org
Sat Apr 22 10:30:05 UTC 2023


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:
9a6a9a3c4c ANDROID: Fix assertion fault and missing initializer


Commit: 9a6a9a3c4cfb4b6c904a659a1ed3577387fe2ba9
    https://github.com/scummvm/scummvm/commit/9a6a9a3c4cfb4b6c904a659a1ed3577387fe2ba9
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-04-22T12:29:15+02:00

Commit Message:
ANDROID: Fix assertion fault and missing initializer

Changed paths:
    backends/fs/android/android-saf-fs.cpp


diff --git a/backends/fs/android/android-saf-fs.cpp b/backends/fs/android/android-saf-fs.cpp
index 34eb3c17d6a..bf606c0983b 100644
--- a/backends/fs/android/android-saf-fs.cpp
+++ b/backends/fs/android/android-saf-fs.cpp
@@ -279,7 +279,7 @@ AndroidSAFFilesystemNode::AndroidSAFFilesystemNode(jobject safTree, jobject safP
 
 // We need the custom copy constructor because of the reference
 AndroidSAFFilesystemNode::AndroidSAFFilesystemNode(const AndroidSAFFilesystemNode &node)
-	: AbstractFSNode(), _safNode(nullptr) {
+	: AbstractFSNode(), _safNode(nullptr), _safParent(nullptr) {
 
 	JNIEnv *env = JNI::getEnv();
 
@@ -409,7 +409,7 @@ bool AndroidSAFFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode
 
 AbstractFSNode *AndroidSAFFilesystemNode::getParent() const {
 	assert(_safTree != nullptr);
-	assert(_safNode != nullptr);
+	// No need to check for _safNode: if node doesn't exist yet parent is its parent
 
 	if (_safParent) {
 		return new AndroidSAFFilesystemNode(_safTree, _safParent);




More information about the Scummvm-git-logs mailing list