Ignore invalid queries

This commit is contained in:
Ron Pedde 2005-03-16 12:26:22 +00:00
parent cb5f0283d6
commit 559a45503f

View File

@ -89,12 +89,13 @@ char *query_build_sql(char *query) {
int size=sizeof(sql);
pquery=query_build(query);
if(!query_build_clause(pquery,&sqlptr,&size)) {
if(pquery) {
if(!query_build_clause(pquery,&sqlptr,&size)) {
query_free(pquery);
return strdup(sql);
}
query_free(pquery);
return strdup(sql);
}
query_free(pquery);
return NULL;
}