From: Zdeněk Salvet Date: Tue, 5 Oct 2004 10:50:04 +0000 (+0000) Subject: Don't crash in getIndexedAttrs() on absence of indexed attributes. X-Git-Tag: glite-lb-common_R_0_2_0~153 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=8224493c5cc473e6620563ef31433c3f818e390c;p=jra1mw.git Don't crash in getIndexedAttrs() on absence of indexed attributes. --- diff --git a/org.glite.lb.client/src/ServerConnection.cpp b/org.glite.lb.client/src/ServerConnection.cpp index 9292c86..319bd0f 100644 --- a/org.glite.lb.client/src/ServerConnection.cpp +++ b/org.glite.lb.client/src/ServerConnection.cpp @@ -595,6 +595,8 @@ ServerConnection::getIndexedAttrs(void) { check_result(edg_wll_GetIndexedAttrs(context,&recs),context, "edg_wll_GetIndexedAttrs()"); + if (!recs) return out; + for (i=0; recs[i]; i++) { std::vector > idx; for (j=0; recs[i][j].attr; j++) {