Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 252249 Details for
Bug 304919
media-gfx/inkscape-0.47: segfault in sp_shape_update_marker_view()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
inkscape-0.48.0-sp_shape_segfault.diff
inkscape-0.48.0-sp_shape_segfault.diff (text/plain), 3.11 KB, created by
Fabio Rossi
on 2010-10-27 17:20:25 UTC
(
hide
)
Description:
inkscape-0.48.0-sp_shape_segfault.diff
Filename:
MIME Type:
Creator:
Fabio Rossi
Created:
2010-10-27 17:20:25 UTC
Size:
3.11 KB
patch
obsolete
>=== modified file 'src/extension/internal/cairo-renderer.cpp' >--- src/extension/internal/cairo-renderer.cpp 2010-04-10 12:51:38 +0000 >+++ src/extension/internal/cairo-renderer.cpp 2010-10-23 20:28:16 +0000 >@@ -191,6 +191,7 @@ > SPStyle* style = SP_OBJECT_STYLE (item); > > Geom::PathVector const & pathv = shape->curve->get_pathvector(); >+ if (pathv.empty()) return; > > ctx->renderPathVector(pathv, style, &pbox); > > >=== modified file 'src/sp-shape.cpp' >--- src/sp-shape.cpp 2010-05-21 21:46:07 +0000 >+++ src/sp-shape.cpp 2010-10-23 20:28:16 +0000 >@@ -410,7 +410,9 @@ > // position arguments to sp_marker_show_instance, basically counts the amount of markers. > int counter[4] = {0}; > >+ if (!shape->curve) return; > Geom::PathVector const & pathv = shape->curve->get_pathvector(); >+ if (pathv.empty()) return; > > // the first vertex should get a start marker, the last an end marker, and all the others a mid marker > // see bug 456148 >@@ -585,7 +587,7 @@ > } > > // Union with bboxes of the markers, if any >- if (sp_shape_has_markers (shape)) { >+ if (sp_shape_has_markers (shape) && !shape->curve->get_pathvector().empty()) { > /** \todo make code prettier! */ > Geom::PathVector const & pathv = shape->curve->get_pathvector(); > // START marker >@@ -767,6 +769,9 @@ > > if (!shape->curve) return; > >+ Geom::PathVector const & pathv = shape->curve->get_pathvector(); >+ if (pathv.empty()) return; >+ > Inkscape::Preferences *prefs = Inkscape::Preferences::get(); > gint add_comments = prefs->getBool("/printing/debug/add-label-comments"); > if (add_comments) { >@@ -788,15 +793,14 @@ > SPStyle* style = SP_OBJECT_STYLE (item); > > if (!style->fill.isNone()) { >- sp_print_fill (ctx, shape->curve->get_pathvector(), &i2d, style, &pbox, &dbox, &bbox); >+ sp_print_fill (ctx, pathv, &i2d, style, &pbox, &dbox, &bbox); > } > > if (!style->stroke.isNone()) { >- sp_print_stroke (ctx, shape->curve->get_pathvector(), &i2d, style, &pbox, &dbox, &bbox); >+ sp_print_stroke (ctx, pathv, &i2d, style, &pbox, &dbox, &bbox); > } > > /** \todo make code prettier */ >- Geom::PathVector const & pathv = shape->curve->get_pathvector(); > // START marker > for (int i = 0; i < 2; i++) { // SP_MARKER_LOC and SP_MARKER_LOC_START > if ( shape->marker[i] ) { > >=== modified file 'src/splivarot.cpp' >--- src/splivarot.cpp 2010-09-02 09:56:00 +0000 >+++ src/splivarot.cpp 2010-10-23 20:28:16 +0000 >@@ -674,6 +674,10 @@ > return ret_pathv; > } > >+ if (curve->get_pathvector().empty()) { >+ return ret_pathv; >+ } >+ > // remember old stroke style, to be set on fill > SPStyle *i_style = SP_OBJECT_STYLE(item); > >@@ -900,6 +904,10 @@ > continue; > } > >+ if (curve->get_pathvector().empty()) { >+ continue; >+ } >+ > // pas de stroke pas de chocolat > if (!SP_OBJECT_STYLE(item) || SP_OBJECT_STYLE(item)->stroke.noneSet) { > curve->unref(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 304919
: 252249