Fix NULL dereference for empty constructors.

Issue=123 Patch by Jacob Benoit. git-svn-id: https://angleproject.googlecode.com/svn/trunk@570 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 62f20f9d
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 566 #define BUILD_REVISION 570
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -558,7 +558,7 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction ...@@ -558,7 +558,7 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction
} }
} }
TIntermTyped* typed = node->getAsTyped(); TIntermTyped *typed = node ? node->getAsTyped() : 0;
if (typed == 0) { if (typed == 0) {
error(line, "constructor argument does not have a type", "constructor", ""); error(line, "constructor argument does not have a type", "constructor", "");
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment