From 4480abca4c265f4bb4e701d31c13d0cb59c66985 Mon Sep 17 00:00:00 2001 From: "jminta%gmail.com" Date: Fri, 31 Mar 2006 21:19:12 +0000 Subject: [PATCH] Bug 329571 Error when setting composite calendar's default calendar with usePref==true, r=dmose git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@193346 18797224-902f-48f8-a5cc-f745e15eee43 --- .../calendar/providers/composite/calCompositeCalendar.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/calendar/providers/composite/calCompositeCalendar.js b/mozilla/calendar/providers/composite/calCompositeCalendar.js index c213cb10a4b..71225a08557 100644 --- a/mozilla/calendar/providers/composite/calCompositeCalendar.js +++ b/mozilla/calendar/providers/composite/calCompositeCalendar.js @@ -236,8 +236,10 @@ calCompositeCalendar.prototype = { if (this.mDefaultCalendar && this.mDefaultCalendar.uri.equals(cal.uri)) return; if (usePref && this.mPrefPrefix) { - this.mCalMgr.deleteCalendarPref(this.mDefaultCalendar, - this.mDefaultPref); + if (this.mDefaultCalendar) { + this.mCalMgr.deleteCalendarPref(this.mDefaultCalendar, + this.mDefaultPref); + } this.mCalMgr.setCalendarPref(cal, this.mDefaultPref, "true"); }