This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/148
-- gerrit commit 4aa87793756ce82541d1c142e63b30c1c0fcc4a6 Author: Ãyvind Harboe <oyvind.har...@zylin.com> Date: Tue Nov 1 22:00:46 2011 +0100 target: fix null pointer exception check if no target is selected and return error. Change-Id: Ie8abb63c708d09572b45e88fc6766af108715077 Signed-off-by: Ãyvind Harboe <oyvind.har...@zylin.com> diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index ef9b839..f023211 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -946,7 +946,13 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv) COMMAND_HANDLER(handle_arm_semihosting_command) { struct target *target = get_current_target(CMD_CTX); - struct arm *arm = target ? target_to_arm(target) : NULL; + + if (target == NULL) { + LOG_ERROR("No target selected"); + return ERROR_FAIL; + } + + struct arm *arm = target_to_arm(target); if (!is_arm(arm)) { command_print(CMD_CTX, "current target isn't an ARM"); --
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development