adg: protect autoscale() from NULL scales
commitee1e175720ca3a6f2d4a758b2c14444c2a1a3581
authorNicola Fontana <ntd@entidi.it>
Mon, 4 Mar 2013 11:43:51 +0000 (4 12:43 +0100)
committerNicola Fontana <ntd@entidi.it>
Mon, 4 Mar 2013 11:43:57 +0000 (4 12:43 +0100)
treead831877024ef4fece3fa11344f4de87c6350bec
parentee5eb23e0b4858cb6263752794860edded5bcd3f
adg: protect autoscale() from NULL scales

When AdgCanvas:scales is NULL, adg_canvas_autoscale() was crashing
because of NULL deferencing. This was exposed by the LGI bindings but
not by the adg-demo.c program because adg_canvas_new() set the scales
property to a not-NULL value while the bindings directly use
g_object_new().
src/adg/adg-canvas.c
src/adg/tests/test-canvas.c