From 5b8284744d73a86d4383407a65053716ea6f1347 Mon Sep 17 00:00:00 2001 From: "Thierry Leconte, F4DWV" Date: Wed, 21 Jan 2004 19:48:12 +0000 Subject: [PATCH] fix SIGSEGV when reading tag without split property git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1653 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- tests/memload.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/memload.c b/tests/memload.c index a7e5d9e86..2ca891d3b 100644 --- a/tests/memload.c +++ b/tests/memload.c @@ -2,7 +2,7 @@ * memload.c - Copyright (C) 2003 Thierry Leconte * * - * $Id: memload.c,v 1.2 2004-01-15 22:43:59 fillods Exp $ + * $Id: memload.c,v 1.3 2004-01-21 19:48:12 f4dwv Exp $ * * * This program is free software; you can redistribute it and/or @@ -175,15 +175,17 @@ int set_chan(RIG *rig, channel_t *chan, xmlNodePtr node) chan->tx_width = atoi(prop); } if (rig->state.chan_list[i].mem_caps.split) { + chan->split=RIG_SPLIT_OFF; prop=xmlGetProp(node, "split"); - if(strcmp(prop,"off")==0) chan->split=RIG_SPLIT_OFF; - if(strcmp(prop,"on")==0) { + if(prop!=NULL) { + if(strcmp(prop,"on")==0) { chan->split=RIG_SPLIT_ON; if (rig->state.chan_list[i].mem_caps.tx_vfo) { prop=xmlGetProp(node, "tx_vfo"); if(prop!=NULL) sscanf(prop,"%x",&chan->tx_vfo); } + } } } if (rig->state.chan_list[i].mem_caps.rptr_shift) {