From 907671d259e4f04a0493b293b35a0ce384b094e8 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 22 Jul 2002 22:07:16 +0000 Subject: [PATCH] don't crash when you press Alt Gr etc. :) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4755 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/QLyXKeySym.C | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index ec0385f89a..9ce4cb8431 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-07-22 John Levon + + * QLyXKeySym.C: return 0 when text_ is empty + for getISOEncoded() + 2002-07-22 John Levon * QCommandBuffer.C: probably compile fix diff --git a/src/frontends/qt2/QLyXKeySym.C b/src/frontends/qt2/QLyXKeySym.C index aeeccc9dcb..c42dc3febe 100644 --- a/src/frontends/qt2/QLyXKeySym.C +++ b/src/frontends/qt2/QLyXKeySym.C @@ -56,6 +56,8 @@ string QLyXKeySym::getSymbolName() const char QLyXKeySym::getISOEncoded() const { + if (!text_.length()) + return 0; // FIXME return text_.latin1()[0]; }