if(expression == NULL) return FALSE;
if(filter == NULL) return FALSE;
+ if(expression[0] == '\0') return FALSE; /* Empty expression */
GString* s = g_string_new("");
if(filter->expression != NULL) {
*(value_filter.v_pointer) = lttv_filter_new();
g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str);
- g_assert(lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str));
+ lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str);
//lttv_traceset_context_add_hooks(tc,
//before_traceset, after_traceset, NULL, before_trace, after_trace,
/*
* call to the filter if available
*/
- if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,tfc->t_context->t,tfs->process,tfc)) {
+ if(filter->head != NULL)
+ if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,tfc->t_context->t,tfs->process,tfc))
return FALSE;
- }
lttv_event_to_string(e, a_string, TRUE, a_field_names, tfs);
g_string_append_printf(a_string,"\n");