tasque r108 - in trunk: . src src/Backends/Rtm
- From: sharm svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r108 - in trunk: . src src/Backends/Rtm
- Date: Fri, 26 Sep 2008 09:44:12 +0000 (UTC)
Author: sharm
Date: Fri Sep 26 09:44:12 2008
New Revision: 108
URL: http://svn.gnome.org/viewvc/tasque?rev=108&view=rev
Log:
* src/Application.cs: Handle null backend the same as unconfigured
backend. Whitespace fixes.
* src/Backends/Rtm/RtmTask.cs, src/Backends/Rtm/RtmBackend.cs: Null
reference checks based on some errors I saw while running in
Windows.
Modified:
trunk/ChangeLog
trunk/src/Application.cs
trunk/src/Backends/Rtm/RtmBackend.cs
trunk/src/Backends/Rtm/RtmTask.cs
Modified: trunk/src/Application.cs
==============================================================================
--- trunk/src/Application.cs (original)
+++ trunk/src/Application.cs Fri Sep 26 09:44:12 2008
@@ -318,20 +318,19 @@
} else {
TaskWindow.ShowWindow();
}
- if(backend.Configured == false){
+ if (backend == null || backend.Configured == false){
GLib.Timeout.Add(1000, new GLib.TimeoutHandler(RetryBackend));
}
return false;
}
private bool RetryBackend(){
- try{
+ try {
backend.Cleanup();
backend.Initialize();
- } catch (Exception e){
+ } catch (Exception e) {
Logger.Error("{0}", e.Message);
}
- if(backend.Configured == false)
- {
+ if (backend == null || backend.Configured == false) {
return true;
} else {
return false;
Modified: trunk/src/Backends/Rtm/RtmBackend.cs
==============================================================================
--- trunk/src/Backends/Rtm/RtmBackend.cs (original)
+++ trunk/src/Backends/Rtm/RtmBackend.cs Fri Sep 26 09:44:12 2008
@@ -597,6 +597,8 @@
if(tasks != null) {
foreach(List tList in tasks.ListCollection)
{
+ if (tList.TaskSeriesCollection == null)
+ continue;
foreach(TaskSeries ts in tList.TaskSeriesCollection)
{
RtmTask rtmTask = new RtmTask(ts, this, list.ID);
Modified: trunk/src/Backends/Rtm/RtmTask.cs
==============================================================================
--- trunk/src/Backends/Rtm/RtmTask.cs (original)
+++ trunk/src/Backends/Rtm/RtmTask.cs Fri Sep 26 09:44:12 2008
@@ -33,10 +33,12 @@
else
state = TaskState.Completed;
notes = new List<INote>();
-
- foreach(Note note in taskSeries.Notes.NoteCollection) {
- RtmNote rtmNote = new RtmNote(note);
- notes.Add(rtmNote);
+
+ if (taskSeries.Notes.NoteCollection != null) {
+ foreach(Note note in taskSeries.Notes.NoteCollection) {
+ RtmNote rtmNote = new RtmNote(note);
+ notes.Add(rtmNote);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]