banshee r4617 - in trunk/banshee: . src/Libraries/Mtp/Mtp



Author: gburt
Date: Thu Sep 25 20:32:04 2008
New Revision: 4617
URL: http://svn.gnome.org/viewvc/banshee?rev=4617&view=rev

Log:
2008-09-25  Gabriel Burt  <gabriel burt gmail com>

	* src/Libraries/Mtp/Mtp/MtpDevice.cs: Prevent NRE (BGO #552428).


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs

Modified: trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs	(original)
+++ trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs	Thu Sep 25 20:32:04 2008
@@ -243,7 +243,9 @@
 				throw new ArgumentNullException("track");
 
             folder = folder ?? MusicFolder;
-            track.trackStruct.parent_id = folder.FolderId;
+            if (folder != null) {
+                track.trackStruct.parent_id = folder.FolderId;
+            }
 			
 			// We send the trackstruct by ref so that when the file_id gets filled in, our copy is updated
 			Track.SendTrack (Handle, path, ref track.trackStruct, callback, IntPtr.Zero, folder.FolderId);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]