Bug 1339779 - bail early if ipcDoc is not yet created. r=tbsaunde
authorYura Zenevich <yura.zenevich@gmail.com>
Tue, 21 Feb 2017 13:11:35 -0500
changeset 373996 aa863fbdf5c21235a92d8e54e23a9ddabd6069f8
parent 373995 132f7517c1f6c81fc0408c0b24ed2990ecee29e5
child 373997 aededf5a3d389f03a89e33f5201bcd8f49ac8c51
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1339779
milestone54.0a1
Bug 1339779 - bail early if ipcDoc is not yet created. r=tbsaunde MozReview-Commit-ID: 1Wm6n7zba35
accessible/windows/msaa/DocAccessibleWrap.cpp
--- a/accessible/windows/msaa/DocAccessibleWrap.cpp
+++ b/accessible/windows/msaa/DocAccessibleWrap.cpp
@@ -122,16 +122,20 @@ DocAccessibleWrap::Shutdown()
 ////////////////////////////////////////////////////////////////////////////////
 // DocAccessible public
 
 void*
 DocAccessibleWrap::GetNativeWindow() const
 {
   if (XRE_IsContentProcess()) {
     DocAccessibleChild* ipcDoc = IPCDoc();
+    if (!ipcDoc) {
+      return nullptr;
+    }
+
     HWND hWnd = ipcDoc->GetEmulatedWindowHandle();
     if (hWnd) {
       return hWnd;
     }
 
     auto tab = static_cast<dom::TabChild*>(ipcDoc->Manager());
     MOZ_ASSERT(tab);
     if (!tab) {