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"); }