From 0a517cf68832234cc5e3731ee286690af087e45e Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 21 Sep 2007 17:29:28 +0000 Subject: [PATCH] Fixed crash when copying cards with has_styling git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@732 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/card.cpp | 2 ++ src/data/format/clipboard.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/data/card.cpp b/src/data/card.cpp index e2ac23c0..0eeec95a 100644 --- a/src/data/card.cpp +++ b/src/data/card.cpp @@ -67,6 +67,8 @@ IMPLEMENT_REFLECTION(Card) { } else if (stylesheet_for_reading()) { REFLECT_IF_READING styling_data.init(stylesheet_for_reading()->styling_fields); REFLECT(styling_data); + } else if (tag.reading()) { + has_styling = false; // We don't know the style, this can be because of copy/pasting } } REFLECT(notes); diff --git a/src/data/format/clipboard.cpp b/src/data/format/clipboard.cpp index 001cca4a..9c488c4e 100644 --- a/src/data/format/clipboard.cpp +++ b/src/data/format/clipboard.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include