From: johanengelen Date: Thu, 10 May 2007 21:39:04 +0000 (+0000) Subject: fixed crash when parameter viewbox=null in nr_path_matrix_point_bbox_wind_distance X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ac612c2939b9cddb725895abd9a3a5e18207404c;p=inkscape.git fixed crash when parameter viewbox=null in nr_path_matrix_point_bbox_wind_distance --- diff --git a/src/libnr/nr-path.cpp b/src/libnr/nr-path.cpp index bef6378f5..03882a7fd 100644 --- a/src/libnr/nr-path.cpp +++ b/src/libnr/nr-path.cpp @@ -273,7 +273,7 @@ nr_path_matrix_point_bbox_wind_distance (NRBPath *bpath, NR::Matrix const &m, NR //std::cout << "swept: " << swept; //std::cout << "view: " << *viewbox; //std::cout << "intersects? " << (swept.intersects(*viewbox)? "YES" : "NO") << "\n"; - if (swept.intersects(*viewbox)) + if (!viewbox || swept.intersects(*viewbox)) nr_line_wind_distance (x0, y0, x3, y3, pt, wind, dist); } } @@ -293,7 +293,7 @@ nr_path_matrix_point_bbox_wind_distance (NRBPath *bpath, NR::Matrix const &m, NR swept.expandTo(NR::Point(x1, y1)); swept.expandTo(NR::Point(x2, y2)); - if (swept.intersects(*viewbox)) { // we see this segment, so do full processing + if (!viewbox || swept.intersects(*viewbox)) { // we see this segment, so do full processing nr_curve_bbox_wind_distance ( x0, y0, x1, y1,