Changeset 14426

Show
Ignore:
Timestamp:
05/10/08 12:00:55 (2 months ago)
Author:
mloskot
Message:

Fixed segmentation fault in swq_select_finish_summarize when SQL query issued on layer without any attributes like empty shapefile (Ticket #2358).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/swq.c

    r13937 r14426  
    23542354{ 
    23552355    int (FORCE_CDECL *compare_func)(const void *, const void*); 
    2356     int count
    2357     char **distinct_list
     2356    int count = 0
     2357    char **distinct_list = NULL
    23582358 
    23592359    if( select_info->query_mode != SWQM_DISTINCT_LIST  
     
    23672367        select_info->column_defs[0].field_index ) 
    23682368        return "Only selected DISTINCT field can be used for ORDER BY."; 
     2369 
     2370    if( select_info->column_summary == NULL ) 
     2371        return NULL; 
    23692372 
    23702373    if( select_info->column_defs[0].field_type == SWQ_INTEGER )