projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1575c9d
)
Don't crash when copying a function with no closure variable.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 21 Dec 2010 22:56:39 +0000
(22:56 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 21 Dec 2010 22:56:39 +0000
(22:56 +0000)
From-SVN: r168140
gcc/go/gofrontend/expressions.h
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.h
b/gcc/go/gofrontend/expressions.h
index
5d7d90b
..
4780a8b
100644
(file)
--- a/
gcc/go/gofrontend/expressions.h
+++ b/
gcc/go/gofrontend/expressions.h
@@
-1346,7
+1346,9
@@
class Func_expression : public Expression
do_copy()
{
return Expression::make_func_reference(this->function_,
- this->closure_->copy(),
+ (this->closure_ == NULL
+ ? NULL
+ : this->closure_->copy()),
this->location());
}