f-spot r4172 - trunk/src
- From: lmilesi svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4172 - trunk/src
- Date: Fri, 11 Jul 2008 10:14:54 +0000 (UTC)
Author: lmilesi
Date: Fri Jul 11 10:14:54 2008
New Revision: 4172
URL: http://svn.gnome.org/viewvc/f-spot?rev=4172&view=rev
Log:
* src/PhotoImageView.cs: fix possible null reference
* src/PhotoStore.cs: fix GetByUri query. Thanks Thomas for pointing the error.
Modified:
trunk/src/PhotoImageView.cs
trunk/src/PhotoStore.cs
Modified: trunk/src/PhotoImageView.cs
==============================================================================
--- trunk/src/PhotoImageView.cs (original)
+++ trunk/src/PhotoImageView.cs Fri Jul 11 10:14:54 2008
@@ -117,7 +117,7 @@
public void Reload ()
{
- if (!Item.IsValid)
+ if (Item == null || !Item.IsValid)
return;
PhotoItemChanged (Item, null);
Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs (original)
+++ trunk/src/PhotoStore.cs Fri Jul 11 10:14:54 2008
@@ -356,7 +356,7 @@
uint timer = Log.DebugTimerStart ();
SqliteDataReader reader = Database.Query (new DbCommand ("SELECT id, time, description, roll_id, default_version_id, rating " +
" FROM photos " +
- " JOIN photo_versions AS pv ON photos.id = pv.photo_id" +
+ " LEFT JOIN photo_versions AS pv ON photos.id = pv.photo_id" +
" WHERE photos.uri = :uri OR pv.uri = :uri", "uri", uri.ToString ()));
if (reader.Read ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]