projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7652142
)
charts: Allow passing a null pointer to chart_unref.
author
Ben Pfaff
<blp@gnu.org>
Mon, 20 Jul 2009 00:11:46 +0000
(17:11 -0700)
committer
Ben Pfaff
<blp@gnu.org>
Mon, 20 Jul 2009 00:11:53 +0000
(17:11 -0700)
src/output/chart.c
patch
|
blob
|
history
diff --git
a/src/output/chart.c
b/src/output/chart.c
index b096a7d2195fc632c863a9e01a7319ea3dceeb80..b1f96ef931b06f6a401c893ddd091271a2e03156 100644
(file)
--- a/
src/output/chart.c
+++ b/
src/output/chart.c
@@
-114,9
+114,12
@@
chart_ref (const struct chart *chart_)
void
chart_unref (struct chart *chart)
{
- assert (chart->ref_cnt > 0);
- if (--chart->ref_cnt == 0)
- chart->class->destroy (chart);
+ if (chart != NULL)
+ {
+ assert (chart->ref_cnt > 0);
+ if (--chart->ref_cnt == 0)
+ chart->class->destroy (chart);
+ }
}
void