So far as I can tell, all CachedBitmap objects are created by the
renderer (in createCachedBitmap()), and because that function always
returns a bitmap_info_cairo, a dynamic_cast does not seem to be
required. You can just replace it with a static_cast instead of
checking the dynamic_cast.
Bastiaan
On Sun, 20 Apr 2014, Petter Reinholdtsen wrote:
diff --git a/librender/cairo/Renderer_cairo.cpp
b/librender/cairo/Renderer_cairo.cpp
index c597dd4..2e95686 100644
--- a/librender/cairo/Renderer_cairo.cpp
+++ b/librender/cairo/Renderer_cairo.cpp
@@ -299,6 +299,9 @@ struct StyleHandler :
boost::static_visitor<cairo_pattern_t*>
const bitmap_info_cairo* binfo =
dynamic_cast<const bitmap_info_cairo*>(bm);
+ if (NULL == binfo) { // CID 1154657, binfo used below
+ throw std::bad_cast();
+ }
cairo_matrix_t mat;
init_cairo_matrix(&mat, m);
_______________________________________________
Gnash-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnash-dev