]> git.lyx.org Git - features.git/commitdiff
Fix bug 5074: Crash while switching to Word
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 28 Nov 2008 22:48:50 +0000 (22:48 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 28 Nov 2008 22:48:50 +0000 (22:48 +0000)
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

index febe4de4069b8bbc8b635983939c2ab828014187..2d8642d482a1cafa33d1d7f064bd09c1aee024e4 100644 (file)
@@ -580,7 +580,8 @@ public:
                QMimeData const * mimeData) const
        {
                QVector<FORMATETC> formats;
-               formats += cfFromMime(mimeType);
+               if (mimetype == emfMimeType() || mimetype == wmfMimeType())
+                       formats += cfFromMime(mimeType);
                return formats;
        }