From 678678acf3ff1719faedc4221447ce7bfdc32cb4 Mon Sep 17 00:00:00 2001 From: "mostafah%oeone.com" Date: Tue, 31 Aug 2004 14:51:15 +0000 Subject: [PATCH] When launching as a thunderbird extension, with the -calendar argument the resize function sometimes gets called before gCalendarWindow has been initiated causing it not to work. This change should fix the problem. --- calendar/resources/content/calendarWindow.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/resources/content/calendarWindow.js b/calendar/resources/content/calendarWindow.js index 6e97ec21dfcc..b8ae5efd68e7 100644 --- a/calendar/resources/content/calendarWindow.js +++ b/calendar/resources/content/calendarWindow.js @@ -580,7 +580,8 @@ CalendarWindow.prototype.onMouseUpCalendarViewSplitter = function calWinOnMouseU * The resize handler, used to set the size of the views so they fit the screen. */ window.onresize = CalendarWindow.prototype.doResize = function calWin_doResize(){ - gCalendarWindow.currentView.refresh(); + if( gCalendarWindow ) + gCalendarWindow.currentView.refresh(); }