diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-03 20:42:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-04 09:38:13 +0100 |
commit | d8863b73755a0d09b1b548246956f74d66de6007 (patch) | |
tree | 1ad8a0b14e2ae056e2e61f940fd2a30184669609 /canvas | |
parent | 312ffe07bbef6b8dbc14ce38c0a726f69dd90946 (diff) |
coverity#735682 Unchecked dynamic_cast
Change-Id: Ie3ac1e9960afa71e5cf221bb67b8b8ccb609dc38
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvasbitmap.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index 68650638cdfa..40b642a396f2 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -221,12 +221,11 @@ namespace cairocanvas case 1: { #ifdef CAIRO_HAS_XLIB_SURFACE - X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(mpBufferSurface.get()); - OSL_ASSERT(pXlibSurface); + X11Surface& rXlibSurface=dynamic_cast<X11Surface&>(*mpBufferSurface.get()); uno::Sequence< uno::Any > args( 3 ); args[0] = uno::Any( false ); // do not call XFreePixmap on it - args[1] = uno::Any( pXlibSurface->getPixmap()->mhDrawable ); - args[2] = uno::Any( sal_Int32( pXlibSurface->getDepth() ) ); + args[1] = uno::Any( rXlibSurface.getPixmap()->mhDrawable ); + args[2] = uno::Any( sal_Int32( rXlibSurface.getDepth() ) ); aRV = uno::Any( args ); #elif defined CAIRO_HAS_QUARTZ_SURFACE |