mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
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:
parent
70f1ea2b11
commit
ce8d8da727
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user