[lasem/lasem-0-4] svg_view: avoid a crash in case of NULL x or y parameter in _show_text



commit da7644fec2e8ccee5d0321ade047c849e6266889
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon May 12 23:07:56 2014 +0200

    svg_view: avoid a crash in case of NULL x or y parameter in _show_text

 src/lsmsvgview.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index 917f178..cf0c3bf 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -1192,7 +1192,8 @@ lsm_svg_view_show_text (LsmSvgView *view, char const *string, double x, double y
 
        style = view->style;
 
-       lsm_debug_render ("[LsmSvgView::show_text] Show '%s' at %g,%g (%g px)", string, *x, *y, 
style->font_size_px);
+       lsm_debug_render ("[LsmSvgView::show_text] Show '%s' at %g,%g (%g px)", string,
+                        x != NULL ? *x : 0, y != NULL ? *y : 0, style->font_size_px);
 
        need_pop = _lock_pango_layout (view);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]