<rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Apr 2009 03:10:29 +0000 (03:10 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Apr 2009 03:10:29 +0000 (03:10 +0000)
commit344f16300d3b9c2926527ef91117ac0796187161
tree6134ca8a70efda96530dd94cca55cc817587ef90
parent6e2dc6efafc56cc5eb8033cea7ea8ea94a877073
<rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file

Reviewed by Dan Bernstein and Timothy Hatcher.

The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
methods.

* WebView/WebView.mm:
(-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
(-[WebView addSizeObservers]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm