From bad6ee18a54363d19e3bfa5e147b7d3e4033c9c5 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 10 May 2007 21:39:04 +0000 Subject: fixed crash when parameter viewbox=null in nr_path_matrix_point_bbox_wind_distance (bzr r2998) --- src/libnr/nr-path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libnr/nr-path.cpp') 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, -- cgit v1.2.3