]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFonts.cpp
Make sure a pointer is valid before using it
[lyx.git] / src / LaTeXFonts.cpp
index 9010615fcb4c19bf0307ef12e5c2795b46e0202b..bc4151cb2502cb16c7888b0d0c71dc8db10cb955 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "support/convert.h"
 #include "support/debug.h"
+#include "support/docstream.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
@@ -259,9 +260,8 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
            && providesScale(ot1, complete, nomath)) {
                if (!os.str().empty())
                        os << ',';
-               ostringstream value;
-               value << float(scale) / 100;
-               os << subst(to_ascii(scaleoption_), "$$val", value.str());
+               os << subst(to_ascii(scaleoption_), "$$val",
+                           convert<std::string>(float(scale) / 100));
        }
        return os.str();
 }