Enlightenment CVS committal Author : titan Project : e17 Module : apps/ephoto
Dir : e17/apps/ephoto/src/bin Modified Files: ephoto_database.c Log Message: Set the lists to Null first. =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_database.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ephoto_database.c 24 Feb 2007 23:30:49 -0000 1.5 +++ ephoto_database.c 11 Mar 2007 09:08:16 -0000 1.6 @@ -11,7 +11,7 @@ static int image_id, album_id; /*Ephoto databasing ecore global variables*/ -static Ecore_List *albums, *images_list, *image_ids; +static Ecore_List *albums = NULL, *images_list = NULL, *image_ids = NULL; /*Open the sqlite3 database. Create the database if it does not already exits.*/ sqlite3 *ephoto_db_init(void) @@ -162,7 +162,7 @@ /*Return a list of albums in the albums table*/ Ecore_List *ephoto_db_list_albums(sqlite3 *db) { - if(albums) + if(!ecore_list_is_empty(albums)) { ecore_list_destroy(albums); } @@ -208,11 +208,11 @@ char command[PATH_MAX]; char *id; - if(images_list) + if(!ecore_list_is_empty(images_list)) { ecore_dlist_destroy(images_list); } - if(image_ids) + if(!ecore_list_is_empty(image_ids)) { ecore_list_destroy(image_ids); } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs