aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-12-14 22:35:02 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-12-14 22:35:02 +0000
commita1c17d585dfa831141b2c23e75f61cf232bf0d03 (patch)
tree815639dec3b6718b48c5e5d945cc9a4ed6fd24a4 /Source
parent66ebb2a7cb0b9f001a399ff7a4066dac0659f472 (diff)
downloadswig-a1c17d585dfa831141b2c23e75f61cf232bf0d03.tar.gz
Fix R unions seg fault
Started seg faulting since nested branch merge
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/r.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Modules/r.cxx b/Source/Modules/r.cxx
index 8b3bc20bb..c3860a161 100644
--- a/Source/Modules/r.cxx
+++ b/Source/Modules/r.cxx
@@ -2299,7 +2299,7 @@ int R::classDeclaration(Node *n) {
/* If we have a typedef union { ... } U, then we never get to see the typedef
via a regular call to typedefHandler. Instead, */
- if(Getattr(n, "unnamed") && Strcmp(Getattr(n, "storage"), "typedef") == 0
+ if(Getattr(n, "unnamed") && Getattr(n, "storage") && Strcmp(Getattr(n, "storage"), "typedef") == 0
&& Getattr(n, "tdname") && Strcmp(Getattr(n, "tdname"), name) == 0) {
if (debugMode)
Printf(stdout, "Typedef in the class declaration for %s\n", name);