From 85f73a4271b1a44429d5a585567a029eb87ff217 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 28 Nov 2008 22:48:50 +0000 Subject: [PATCH] Fix bug 5074: Crash while switching to Word http://bugzilla.lyx.org/show_bug.cgi?id=5074 In GuiApplication.cpp the function cfFromMime returns an invalid FORMATETC struct with uninitialized members when the mimeType is not emf or wmf. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27727 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index febe4de406..2d8642d482 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -580,7 +580,8 @@ public: QMimeData const * mimeData) const { QVector formats; - formats += cfFromMime(mimeType); + if (mimetype == emfMimeType() || mimetype == wmfMimeType()) + formats += cfFromMime(mimeType); return formats; }