Fix segfault drawing pie charts with old versions of libplot.
authorBen Pfaff <blp@gnu.org>
Fri, 3 Jul 2009 18:34:26 +0000 (11:34 -0700)
committerBen Pfaff <blp@gnu.org>
Fri, 3 Jul 2009 18:34:26 +0000 (11:34 -0700)
commit49a428e6e922f86b94f8559347d3fb90031b119a
tree4cb58f454791c41f76b79da93a430194339597c1
parentf1bfc8bb1d477a04388b9e41b3f36af6bb598771
Fix segfault drawing pie charts with old versions of libplot.

If chart_create returned null, we dereferenced a null pointer just below.
Avoid doing this.

Also add similar fixes to other code that calls chart_create.  It may not
be necessary in every case.

Reported by Jason Stover.
src/language/stats/examine.q
src/output/charts/piechart.c
src/output/charts/plot-hist.c