]> git.lyx.org Git - features.git/commitdiff
* src/Encoding.cpp (latexChar):
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 7 May 2007 15:08:27 +0000 (15:08 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 7 May 2007 15:08:27 +0000 (15:08 +0000)
- assure the encodings are proper initialized.
  supposedely fixes bugs 3561 and 3562

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18221 a592a061-630c-0410-9148-cb99ea01b6c8

src/Encoding.cpp

index 0e92862f4c6b3baae375588af9bb6eabf194c70e..59536062686ddafe77a5b169ba6f43c1870922b8 100644 (file)
@@ -193,8 +193,10 @@ void Encoding::init() const
 
 docstring const Encoding::latexChar(char_type c) const
 {
-       // validate() should have been called before
-       //BOOST_ASSERT(complete_);
+       // assure the used encoding is properly initialized
+       if (!complete_)
+               init();
+       BOOST_ASSERT(complete_);
 
        if (c < start_encodable_)
                return docstring(1, c);