]> git.lyx.org Git - features.git/commitdiff
Amend b30f8d3c
authorGuillaume Munch <gm@lyx.org>
Mon, 21 Nov 2016 11:09:48 +0000 (12:09 +0100)
committerGuillaume Munch <gm@lyx.org>
Mon, 21 Nov 2016 11:09:48 +0000 (12:09 +0100)
Fix assertion. Thanks Scott for the bisect and the trace.

src/Row.cpp

index 5f2bd2f1c82fa85151ef3a468aa923e8ab86abc4..9df572441cae0e735f0f6f9678c9f5c4c2d2467c 100644 (file)
@@ -337,6 +337,8 @@ bool Row::setExtraWidth(int w)
        int exp_amount = 0;
        for (Row::Element const & e : elements_)
                exp_amount += e.expansionAmount();
+       if (!exp_amount)
+               return false;
        // extra length per expander per em
        double extra_per_em = double(w) / exp_amount;
        if (extra_per_em > MAX_SPACE_STRETCH)