diff --git a/gfx/src/gtk/nsDeviceContextGTK.cpp b/gfx/src/gtk/nsDeviceContextGTK.cpp index 7c73f76ccdc1..f89cfc906479 100644 --- a/gfx/src/gtk/nsDeviceContextGTK.cpp +++ b/gfx/src/gtk/nsDeviceContextGTK.cpp @@ -75,8 +75,6 @@ NS_IMPL_RELEASE(nsDeviceContextGTK) NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget) { - NS_ASSERTION(!(aNativeWidget == nsnull), "attempt to init devicecontext with null widget"); - for (PRInt32 cnt = 0; cnt < 256; cnt++) mGammaTable[cnt] = cnt; diff --git a/gfx/src/gtk/nsRenderingContextGTK.cpp b/gfx/src/gtk/nsRenderingContextGTK.cpp index f4ef8166de91..26dbb76ebf27 100644 --- a/gfx/src/gtk/nsRenderingContextGTK.cpp +++ b/gfx/src/gtk/nsRenderingContextGTK.cpp @@ -132,6 +132,8 @@ NS_IMETHODIMP nsRenderingContextGTK::Init(nsIDeviceContext* aContext, mContext = aContext; NS_IF_ADDREF(mContext); + ::gdk_rgb_init(); + mRenderingSurface = new nsDrawingSurfaceGTK(); mRenderingSurface->drawable = (GdkDrawable *)aWindow->GetNativeData(NS_NATIVE_WINDOW);