From 33f72055b7eab0e3925625490326ab3e9ff24388 Mon Sep 17 00:00:00 2001 From: ntfreak Date: Mon, 4 Feb 2008 08:25:07 +0000 Subject: Added patch to stop SEGFAULT with missing jtag config lines. Thanks Øyvind Harboe https://lists.berlios.de/pipermail/openocd-development/2008-January/000731.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.berlios.de/openocd/trunk@280 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/jtag.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index c205d837..e413b9f3 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -331,8 +331,9 @@ jtag_device_t* jtag_get_device(int num) device = device->next; i++; } - - return NULL; + + ERROR("jtag device number %d not defined", num); + exit(-1); } void* cmd_queue_alloc(size_t size) -- cgit v1.2.3