[Scummvm-git-logs] scummvm master -> 03da927aaa3880dd6837868b28981729bc83e0e7
rvanlaar
noreply at scummvm.org
Thu Sep 22 15:26:44 UTC 2022
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:
03da927aaa DIRECTOR: Fix check on (shared)cast for formatting
Commit: 03da927aaa3880dd6837868b28981729bc83e0e7
https://github.com/scummvm/scummvm/commit/03da927aaa3880dd6837868b28981729bc83e0e7
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-22T17:26:35+02:00
Commit Message:
DIRECTOR: Fix check on (shared)cast for formatting
Check for existance of `cast and `sharedcast` before calling
`getCastMember` on it.
Changed paths:
engines/director/debugger.cpp
diff --git a/engines/director/debugger.cpp b/engines/director/debugger.cpp
index 249dadb5653..47696c2fcf5 100644
--- a/engines/director/debugger.cpp
+++ b/engines/director/debugger.cpp
@@ -189,23 +189,25 @@ bool Debugger::cmdCast(int argc, const char **argv) {
castId = atoi(argv[1]);
debugPrintf("Cast:\n");
- if (castId > -1 && !cast->getCastMember(castId)) {
+ if (!cast) {
+ debugPrintf("[empty]\n");
+ } else if (castId > -1 && !cast->getCastMember(castId)) {
debugPrintf("[not found]\n");
- } else if (cast) {
- debugPrintf("%s\n", cast->formatCastSummary(castId).c_str());
} else {
- debugPrintf("[empty]\n");
+ debugPrintf("%s\n", cast->formatCastSummary(castId).c_str());
}
debugPrintf("\n");
+
debugPrintf("Shared cast:\n");
- if (castId > -1 && !sharedCast->getCastMember(castId)) {
+ if (!sharedCast) {
+ debugPrintf("[empty]\n");
+ } else if (castId > -1 && !sharedCast->getCastMember(castId)) {
debugPrintf("[not found]\n");
- } else if (sharedCast) {
- debugPrintf("%s\n", sharedCast->formatCastSummary(castId).c_str());
} else {
- debugPrintf("[empty]\n");
+ debugPrintf("%s\n", sharedCast->formatCastSummary(castId).c_str());
}
debugPrintf("\n");
+
return true;
}
More information about the Scummvm-git-logs
mailing list