Fixed a bug in dumptree
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 24 Dec 2001 22:13:12 +0000 (22:13 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 24 Dec 2001 22:13:12 +0000 (22:13 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1741 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 48a96f04e1f5431ca2466ad0a6f57cc79814438b..fcf5aa16960e4576feefae78cbb6794fd7ca9aea 100644 (file)
@@ -4876,7 +4876,9 @@ void ast_print (ast * tree, FILE *outfile, int indent)
                /*----------------------------*/
        case RETURN:
                fprintf(outfile,"RETURN (%p) type (",tree);
-               printTypeChain(tree->right->ftype,outfile);
+               if (tree->right) {
+                   printTypeChain(tree->right->ftype,outfile);
+               }
                fprintf(outfile,")\n");
                ast_print(tree->right,outfile,indent+2);
                return ;