From 832f62039838585b9ade78020b295d0c1c124a74 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 6 Feb 2002 15:36:29 +0000 Subject: [PATCH] type can be empty ! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3495 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 15 ++++++++++----- src/frontends/qt2/QToc.C | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 49afac571b..3cb9f5bf97 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,4 +1,9 @@ +2002-02-06 John Levon + + * QToc.C: fix crash + 2002-02-06 Edwin Leuven + * QGraphics.C: compilation fix * QTexinfoDialog.C: * QTexinfoDialog.h: @@ -6,11 +11,11 @@ 2002-01-31 Edwin Leuven - * qt2/QGraphics.C - * qt2/QGraphics.h - * qt2/QGraphicsDialog.C - * qt2/QGraphicsDialog.h - * qt2/lengthcombo.C + * qt2/QGraphics.C: + * qt2/QGraphics.h: + * qt2/QGraphicsDialog.C: + * qt2/QGraphicsDialog.h: + * qt2/lengthcombo.C: * qt2/ui/QGraphicsDialog.ui: new dialog * qt2/QAbout.C: * qt2/ui/QAboutDialog.ui: reduce size diff --git a/src/frontends/qt2/QToc.C b/src/frontends/qt2/QToc.C index 50d8042c42..2806b253db 100644 --- a/src/frontends/qt2/QToc.C +++ b/src/frontends/qt2/QToc.C @@ -76,7 +76,8 @@ void QToc::update_contents() void QToc::updateToc(int newdepth) { - string const type = dialog_->typeCO->currentText().latin1(); + char const * str = dialog_->typeCO->currentText().latin1(); + string type (str ? str : ""); Buffer::SingleList const & contents = controller().getContents(type);