From 56dda4fb505028b68abac775b005cef65bce3477 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 21 Sep 2013 21:18:07 +0200 Subject: Fixed segfault on copying text. Fixed bugs: - https://launchpad.net/bugs/1228509 (bzr r12569) --- src/text-context.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 10973b7aa..f12ce6aa6 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1390,8 +1390,11 @@ SPCSSAttr *sp_text_get_style_at_cursor(SPEventContext const *ec) return NULL; SPObject const *obj = sp_te_object_at_position(tc->text, tc->text_sel_end); - if (obj) - return take_style_from_item(SP_ITEM(obj)); + + if (obj) { + return take_style_from_item(const_cast(obj)); + } + return NULL; } -- cgit v1.2.3