added NULL check in MTP objlist reader

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9876 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2007-01-10 21:24:45 +00:00
parent 649a8d49ca
commit 8832afef20
2 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2007-01-10 Marcus Meissner <marcus@jet.franken.de>
* library.c: Added NULL check in MTP objlist reader.
2007-01-06 Marcus Meissner <marcus@jet.franken.de>
* library.c, ptp.c, ptp.h, ptp-private.h, usb.c:

View File

@@ -3607,6 +3607,12 @@ init_ptp_fs (Camera *camera, GPContext *context)
xpl = proplist; i = -1;
while (xpl) {
if (lasthandle != xpl->ObjectHandle) {
if (i >= 0) {
if (!oinfos[i].Filename) {
/* i have one such file on my Creative */
oinfos[i].Filename = strdup("<null>");
}
}
i++;
lasthandle = xpl->ObjectHandle;
params->handles.Handler[i] = xpl->ObjectHandle;