]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/xformsGImage.C
Herbert's and my fixes to the graphics inset.
[lyx.git] / src / frontends / xforms / xformsGImage.C
index 257c1fd61d04c94791c3d3e369a9be15d138e484..57069e8cfefbc33461f035f73fae6008439ab8ac 100644 (file)
@@ -251,7 +251,8 @@ void xformsGImage::clip(GParams const & params)
        int const new_width  = params.bb.xr - params.bb.xl;
        int const new_height = params.bb.yt - params.bb.yb;
 
-       if (new_width > image_->w || new_height > image_->h)
+       if (new_width  <= 0 || new_width > image_->w ||
+           new_height <= 0 || new_height > image_->h)
                // Bounds are invalid.
                return;