tasque r172 - in trunk: . src src/Backends/Sqlite
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r172 - in trunk: . src src/Backends/Sqlite
- Date: Tue, 23 Dec 2008 00:16:36 +0000 (UTC)
Author: sharm
Date: Tue Dec 23 00:16:36 2008
New Revision: 172
URL: http://svn.gnome.org/viewvc/tasque?rev=172&view=rev
Log:
* tasque/src/TaskTreeView.cs: Have FilterFunc return false when the
given task is null. Fixes crash reported in bug #526662.
* tasque/src/Backends/Sqlite/SqliteBackend.cs: Don't try to close a null
database.
Modified:
trunk/ChangeLog
trunk/src/Backends/Sqlite/SqliteBackend.cs
trunk/src/TaskTreeView.cs
Modified: trunk/src/Backends/Sqlite/SqliteBackend.cs
==============================================================================
--- trunk/src/Backends/Sqlite/SqliteBackend.cs (original)
+++ trunk/src/Backends/Sqlite/SqliteBackend.cs Tue Dec 23 00:16:36 2008
@@ -113,7 +113,10 @@
public void DeleteTask(ITask task)
{
+ //string id = task.Id;
task.Delete ();
+ //string command = "delete from Tasks where id=" + id;
+ //db.ExecuteNonQuery (command);
}
public void Refresh()
@@ -150,7 +153,8 @@
this.taskStore.Clear();
this.taskIters.Clear();
- db.Close();
+ if (db != null)
+ db.Close();
db = null;
initialized = false;
}
Modified: trunk/src/TaskTreeView.cs
==============================================================================
--- trunk/src/TaskTreeView.cs (original)
+++ trunk/src/TaskTreeView.cs Tue Dec 23 00:16:36 2008
@@ -520,6 +520,11 @@
{
// Filter out deleted tasks
ITask task = model.GetValue (iter, 0) as ITask;
+
+ if (task == null) {
+ Logger.Error ("FilterFunc: task at iter was null");
+ return false;
+ }
if (task.State == TaskState.Deleted) {
//Logger.Debug ("TaskTreeView.FilterFunc:\n\t{0}\n\t{1}\n\tReturning false", task.Name, task.State);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]