]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.C
Continue to improve GtkLengthEntry
[lyx.git] / src / buffer_funcs.C
index ef0b89ebfead166edefca3b003e35d1a9334ceda..d13042f063674f4755cc359f6293036416c323db 100644 (file)
@@ -215,13 +215,15 @@ void bufferErrors(Buffer const & buf, TeXErrors const & terr)
                int id_start = -1;
                int pos_start = -1;
                int errorrow = cit->error_in_line;
-               buf.texrow().getIdFromRow(errorrow, id_start, pos_start);
+               bool found = buf.texrow().getIdFromRow(errorrow, id_start,
+                                                      pos_start);
                int id_end = -1;
                int pos_end = -1;
                do {
                        ++errorrow;
-                       buf.texrow().getIdFromRow(errorrow, id_end, pos_end);
-               } while (id_start == id_end && pos_start == pos_end);
+                       found = buf.texrow().getIdFromRow(errorrow, id_end,
+                                                         pos_end);
+               } while (found && id_start == id_end && pos_start == pos_end);
 
                buf.error(ErrorItem(cit->error_desc, cit->error_text,
                                    id_start, pos_start, pos_end));
@@ -474,9 +476,10 @@ void setCounter(Buffer const & buf, ParIterator & it)
                        --i;
                        InsetBase * const in = &it[i].inset();
                        if (in->lyxCode() == InsetBase::FLOAT_CODE
-                           || in->lyxCode() == InsetBase::WRAP_CODE)
+                           || in->lyxCode() == InsetBase::WRAP_CODE) {
                                type = in->getInsetName();
                                break;
+                       }
                }
 
                string s;