- GdkWindow* gdk_window = dc.GetGDKWindow();
- wxASSERT_MSG( gdk_window,
- wxT("cannot use wxRendererNative on wxDC of this type") );
+ wxWindowDCImpl * const impl = wxDynamicCast(dc.GetImpl(), wxWindowDCImpl);
+ wxCHECK_RET( impl, "must have a window DC" );
+
+ GdkWindow* gdk_window = impl->GetGDKWindow();