[f-spot] prevent crash on Timeline when PhotoQuery is empty
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] prevent crash on Timeline when PhotoQuery is empty
- Date: Mon, 13 Jul 2009 11:05:14 +0000 (UTC)
commit 9968374c80ae5d974a95829420a9136c771a2fcb
Author: Mike Gemünde <mike gemuende de>
Date: Mon Jul 13 09:19:03 2009 +0200
prevent crash on Timeline when PhotoQuery is empty
src/PhotoQuery.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/PhotoQuery.cs b/src/PhotoQuery.cs
index 819b54f..ad2a67e 100644
--- a/src/PhotoQuery.cs
+++ b/src/PhotoQuery.cs
@@ -306,6 +306,9 @@ namespace FSpot {
private int LookupItem (System.DateTime date, bool asc)
{
+ if (Count == 0)
+ return -1;
+
uint timer = Log.DebugTimerStart ();
int low = 0;
int high = Count - 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]