Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11176/src

Modified Files:
        file.c 
Log Message:
Fixed another possible segfault in file.c (get_track_info_from_file)



Index: file.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- file.c      21 Nov 2005 10:53:07 -0000      1.149
+++ file.c      22 Nov 2005 11:41:16 -0000      1.150
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-11-21 19:51:51 jcs>
+/* Time-stamp: <2005-11-22 09:02:28 jcs>
 |
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
@@ -893,34 +893,35 @@
     case FILE_TYPE_MP3:
        nti = mp3_get_file_info (name);
        /* Set unk208 to audio */
-       nti->unk208 = 0x00000001;
+       if (nti) nti->unk208 = 0x00000001;
        break;
     case FILE_TYPE_M4A:
     case FILE_TYPE_M4P:
     case FILE_TYPE_M4B:
        nti = mp4_get_file_info (name);
        /* Set unk208 to audio */
-       nti->unk208 = 0x00000001;
+       if (nti) nti->unk208 = 0x00000001;
        break;
     case FILE_TYPE_WAV:
        nti = wav_get_file_info (name);
        /* Set unk208 to audio */
-       nti->unk208 = 0x00000001;
+       if (nti) nti->unk208 = 0x00000001;
        break;
     case FILE_TYPE_M4V:
     case FILE_TYPE_MP4:
        /* I don't know if .m4v and .mp4 can simply be handled like
           this. Let's see if someone complains. */
        nti = mp4_get_file_info (name);
+       if (!nti) video_get_file_info (name);
        /* Set unk208 to video */
-       nti->unk208 = 0x00000002;
+       if (nti) nti->unk208 = 0x00000002;
        break;
     case FILE_TYPE_MOV:
     case FILE_TYPE_MPG:
        /* for now treat all the same */
        nti = video_get_file_info (name);
        /* Set unk208 to video */
-       nti->unk208 = 0x00000002;
+       if (nti) nti->unk208 = 0x00000002;
        break;
     case FILE_TYPE_UNKNOWN:
        gtkpod_warning (_("The following track could not be processed (filetype 
unknown): '%s'\n"), name_utf8);



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to