[Scummvm-git-logs] scummvm master -> 6c248275c87585a4bc8f0e2495cfeca9e4bbb48e

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


Commit: 6c248275c87585a4bc8f0e2495cfeca9e4bbb48e
    https://github.com/scummvm/scummvm/commit/6c248275c87585a4bc8f0e2495cfeca9e4bbb48e
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-04-22T12:28:22+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 53690874fa2..c577229325e 100644
--- a/backends/fs/android/android-saf-fs.cpp
+++ b/backends/fs/android/android-saf-fs.cpp
@@ -280,7 +280,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();
 
@@ -410,7 +410,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