target: fix null pointer exception
commit06216744ed1bae8a92333c13ae9b1e270e4c0747
authorØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 1 Nov 2011 21:00:46 +0000 (1 22:00 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 1 Nov 2011 21:20:19 +0000 (1 21:20 +0000)
tree4c98ea327e41184683563e057a09629bef8d77b1
parent889a306fc8cb266462b630b19ebf8a319d07c9f0
target: fix null pointer exception

check if no target is selected and return error.

Change-Id: Ie8abb63c708d09572b45e88fc6766af108715077
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/148
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/armv4_5.c