Don't crash in getIndexedAttrs() on absence of indexed attributes.
authorZdeněk Salvet <salvet@ics.muni.cz>
Tue, 5 Oct 2004 10:50:04 +0000 (10:50 +0000)
committerZdeněk Salvet <salvet@ics.muni.cz>
Tue, 5 Oct 2004 10:50:04 +0000 (10:50 +0000)
org.glite.lb.client/src/ServerConnection.cpp

index 9292c86..319bd0f 100644 (file)
@@ -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<std::pair<QueryRecord::Attr,std::string> >  idx;
                for (j=0; recs[i][j].attr; j++) {