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

bgK bastien.bouclet at gmail.com
Sat Jun 30 19:18:01 CEST 2018


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:
e26259d758 GUI: Fix null pointer dereference in mass add


Commit: e26259d758f3bc948fa6b2571d50a5944d94e9f0
    https://github.com/scummvm/scummvm/commit/e26259d758f3bc948fa6b2571d50a5944d94e9f0
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-06-30T19:17:41+02:00

Commit Message:
GUI: Fix null pointer dereference in mass add

When looking for duplicates if the detected game had an unknown platform
or an unknown language, the string for the corresponding code is null,
resulting in a null pointer dereference.

Changed paths:
    gui/massadd.cpp


diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 8bc5a10..66a1a23 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -209,8 +209,8 @@ void MassAddDialog::handleTickle() {
 
 			// Check for existing config entries for this path/gameid/lang/platform combination
 			if (_pathToTargets.contains(path)) {
-				const char *resultPlatformCode = Common::getPlatformCode(result.platform);
-				const char *resultLanguageCode = Common::getLanguageCode(result.language);
+				Common::String resultPlatformCode = Common::getPlatformCode(result.platform);
+				Common::String resultLanguageCode = Common::getLanguageCode(result.language);
 
 				bool duplicate = false;
 				const StringArray &targets = _pathToTargets[path];





More information about the Scummvm-git-logs mailing list