From 319455194bf1f495d7ffe41ff2b1447cfef51ede Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 7 Jan 2020 15:20:36 +0000 Subject: [PATCH] If android debug key generation fails, bail out of patching --- renderdoc/android/android_patch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/android/android_patch.cpp b/renderdoc/android/android_patch.cpp index dd3b0a8df..eec651fe1 100644 --- a/renderdoc/android/android_patch.cpp +++ b/renderdoc/android/android_patch.cpp @@ -223,7 +223,10 @@ rdcstr GetAndroidDebugKey() Process::ProcessResult result = execCommand(keytool, create); if(!result.strStderror.empty()) + { RDCERR("Failed to create debug key"); + return ""; + } return key; } @@ -237,6 +240,9 @@ bool DebugSignAPK(const rdcstr &apk, const rdcstr &workDir) rdcstr debugKey = GetAndroidDebugKey(); + if(debugKey.empty()) + return false; + rdcstr args; args += " sign "; args += " --ks \"" + debugKey + "\" ";