commit 344ea62dd0ee611eab65d96c65a6ef767d835114
Author: Richard Heck <rgh...@lyx.org>
Date:   Fri May 23 10:48:22 2014 -0400

    Fix up logic of BibTeXInfo::getInfo. We don't need to process the
    richtext stuff unless we actually need it.

diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp
index 7c77610..dd389c5 100644
--- a/src/BiblioInfo.cpp
+++ b/src/BiblioInfo.cpp
@@ -624,12 +624,17 @@ docstring const & BibTeXInfo::getInfo(BibTeXInfo const * 
const xref,
        info_ = expandFormat(format, xref, counter, buf,
                docstring(), docstring(), docstring(), false);
 
-       if (!info_.empty()) {
+       if (info_.empty()) {
+               // this probably shouldn't happen
+               return info_;
+       }
+
+       if (richtext) {
                info_richtext_ = convertLaTeXCommands(processRichtext(info_, 
true));
-               info_ = convertLaTeXCommands(processRichtext(info_, false));
-               if (richtext)
-                       return info_richtext_;
+               return info_richtext_;
        }
+
+       info_ = convertLaTeXCommands(processRichtext(info_, false));
        return info_;
 }
 

Reply via email to