Bug 636008 - [Maemo6] Fennec crashes on startup, with Xlib error. r=wolfiR a=npotb
authorOleg Romashin <romaxa@gmail.com>
Wed, 23 Feb 2011 09:39:00 -0800
changeset 63004 3c68f42b4682e87df86c30bdad984f53f6d7b926
parent 63003 5fad82bd457e10d63e4526c901a8c86264e61972
child 63005 27ab44a83e3e6a57564516f3d70c59815bcf562a
push id18986
push userromaxa@gmail.com
push dateWed, 23 Feb 2011 18:00:26 +0000
treeherdermozilla-central@3c68f42b4682 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswolfiR, npotb
bugs636008
milestone2.0b13pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 636008 - [Maemo6] Fennec crashes on startup, with Xlib error. r=wolfiR a=npotb
widget/src/qt/nsWindow.cpp
--- a/widget/src/qt/nsWindow.cpp
+++ b/widget/src/qt/nsWindow.cpp
@@ -2601,18 +2601,20 @@ nsWindow::createQWidget(MozQWidget *pare
         newView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 
 #if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 0))
         // Top level widget is just container, and should not be painted
         widget->setFlag(QGraphicsItem::ItemHasNoContents);
 #endif
 
 #ifdef MOZ_X11
-        XSetWindowBackgroundPixmap(QX11Info::display(),
-                                   newView->effectiveWinId(), None);
+        if (newView->effectiveWinId()) {
+            XSetWindowBackgroundPixmap(QX11Info::display(),
+                                       newView->effectiveWinId(), None);
+        }
 #endif
     }
 
     if (mWindowType == eWindowType_popup) {
         widget->setZValue(100);
 
         // XXX is this needed for Qt?
         // gdk does not automatically set the cursor for "temporary"