diff --git a/gfx/src/os2/nsDeviceContextOS2.cpp b/gfx/src/os2/nsDeviceContextOS2.cpp index 305674a40b4c..97152ab2050e 100644 --- a/gfx/src/os2/nsDeviceContextOS2.cpp +++ b/gfx/src/os2/nsDeviceContextOS2.cpp @@ -326,7 +326,7 @@ nsresult nsDeviceContextOS2::CreateRenderingContext( nsIRenderingContext *&aCont surf->Init( mPrintPS, mWidth, mHeight, 0); - nsresult rc = pContext->Init( this, (void*)((nsDrawingSurfaceOS2 *) surf)); + nsresult rc = pContext->Init(this, surf); if( NS_OK != rc) {