~drbob/+junk/diary-main

« back to all changes in this revision

Viewing changes to src/storage-manager.c

  • Committer: Philip Withnall
  • Date: 2008-05-21 15:04:05 UTC
  • Revision ID: philip@tecnocode.co.uk-20080521150405-2mzmsirmsmpmkcao
2008-05-21  Philip Withnall  <philip@tecnocode.co.uk>

        * src/storage-manager.c: Fix a crasher bug if requesting statistics
        for a database with no entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
572
572
                return FALSE;
573
573
        } else {
574
574
                *entry_count = atoi (results->data[2]);
 
575
                if (*entry_count == 0) {
 
576
                        *character_count = 0;
 
577
                        *link_count = 0;
 
578
                        return TRUE;
 
579
                }
 
580
 
575
581
                *character_count = atoi (results->data[3]);
576
582
        }
577
583
        diary_storage_manager_free_results (results);