summaryrefslogtreecommitdiff
path: root/camlibs/ptp2/library.c
diff options
context:
space:
mode:
Diffstat (limited to 'camlibs/ptp2/library.c')
-rw-r--r--camlibs/ptp2/library.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index b0007c596..a76665f35 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -7942,6 +7942,10 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
free (ximage);
ximage = NULL;
offset += xsize;
+ if (!xsize) {
+ GP_LOG_E ("getpartialobject loop: offset=%d, size is %d, xlen returned is 0?", offset, size);
+ break;
+ }
}
goto done;
}