Don't pass "this" to a member class if the member class is going to Addref, and we haven't called NS_INIT_REFCNT first.

This commit is contained in:
mcmullen%netscape.com 1999-02-03 03:24:54 +00:00
parent 70f1ea2b11
commit ce8d8da727

View File

@ -16,13 +16,12 @@
* Reserved.
*/
#include <LowMem.h>
#include "nsWindow.h"
#include "nsMacWindow.h"
#include "nsMacEventHandler.h"
#include "nsMacMessageSink.h"
#include <LowMem.h>
// from MacHeaders.c
#ifndef topLeft
#define topLeft(r) (((Point *) &(r))[0])
@ -56,9 +55,10 @@ NS_IMPL_RELEASE(nsMacWindow);
nsMacWindow::nsMacWindow() : nsWindow()
, mWindowMadeHere(PR_FALSE)
, mIsDialog(PR_FALSE)
, mMacEventHandler(new nsMacEventHandler(this))
, mMacEventHandler(nsnull)
{
NS_INIT_REFCNT();
mMacEventHandler.reset(new nsMacEventHandler(this));
strcpy(gInstanceClassName, "nsMacWindow");
}