From 9c8f7f490ca029e066a0a21241c8affa34a9155e Mon Sep 17 00:00:00 2001 From: Till Adam Date: Sat, 7 Jun 2003 14:19:05 +0000 Subject: [PATCH] Don't free non-existant files. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6485 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/spca50x/spca50x-flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camlibs/spca50x/spca50x-flash.c b/camlibs/spca50x/spca50x-flash.c index da21a0d65..52aa3c636 100644 --- a/camlibs/spca50x/spca50x-flash.c +++ b/camlibs/spca50x/spca50x-flash.c @@ -54,7 +54,7 @@ static void free_files (CameraPrivateLibrary *pl) { int i; - if (pl->files){ + if (pl->files) { for (i = 0; i < pl->num_files_on_flash; i++){ if(pl->files[i].thumb) free (pl->files[i].thumb); } @@ -838,7 +838,7 @@ spca50x_flash_close (CameraPrivateLibrary *pl, GPContext *context) } - if (pl->dirty_flash == 0){ + if (!pl->dirty_flash && pl->brige == BRIDGE_SPCA500) { /* check if we need to free the file info buffers */ free_files(pl); }