[f-spot] Fix potential NRE in SyncMetadataJob.



commit a23aa5dc6e5973da942ca72eb4cfdac12222b191
Author: Ruben Vermeersch <ruben savanne be>
Date:   Sat Aug 7 22:14:37 2010 +0200

    Fix potential NRE in SyncMetadataJob.

 src/Jobs/SyncMetadataJob.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Jobs/SyncMetadataJob.cs b/src/Jobs/SyncMetadataJob.cs
index 9592dc4..ca99a7b 100644
--- a/src/Jobs/SyncMetadataJob.cs
+++ b/src/Jobs/SyncMetadataJob.cs
@@ -37,10 +37,11 @@ namespace FSpot.Jobs {
 
             try {
                 Photo photo = FSpot.App.Instance.Database.Photos.Get (Convert.ToUInt32 (JobOptions)) as Photo;
-                Log.DebugFormat ("Syncing metadata to file ({0})...", photo.DefaultVersion.Uri);
                 if (photo == null)
                     return false;
 
+                Log.DebugFormat ("Syncing metadata to file ({0})...", photo.DefaultVersion.Uri);
+
                 WriteMetadataToImage (photo);
                 return true;
             } catch (System.Exception e) {



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