[Scummvm-git-logs] scummvm branch-2-7 -> 122ddf1f2650b3b8691742305f61fcea1ba1756b

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


Commit: 122ddf1f2650b3b8691742305f61fcea1ba1756b
    https://github.com/scummvm/scummvm/commit/122ddf1f2650b3b8691742305f61fcea1ba1756b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-04-22T12:29:01+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