From 876d88a86e3c1f6072770bd28ae343e80cc1d769 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 2 Nov 2007 16:43:24 +0000 Subject: [PATCH] add some assertion for C-style table access. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21379 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiFontLoader.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontends/qt4/GuiFontLoader.h b/src/frontends/qt4/GuiFontLoader.h index eeae2903eb..4ca34b92da 100644 --- a/src/frontends/qt4/GuiFontLoader.h +++ b/src/frontends/qt4/GuiFontLoader.h @@ -22,6 +22,7 @@ #include +#include #include namespace lyx { @@ -67,6 +68,10 @@ public: /// Get font info (font + metrics) for the given LyX font. GuiFontInfo & fontinfo(FontInfo const & f) { + BOOST_ASSERT(f.family() < NUM_FAMILIES); + BOOST_ASSERT(f.series() < 2); + BOOST_ASSERT(f.realShape() < 4); + BOOST_ASSERT(f.size() < 10); // fi is a reference to the pointer type (GuiFontInfo *) in the // fontinfo_ table. GuiFontInfo * & fi = -- 2.39.2