summaryrefslogtreecommitdiff
blob: 8d4300b00deee2ce01f38120176d9056af93cb37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
commit 50f01c2d6b28110f8517a77960e456c1125bdb6e
Author: Arno Rehn <arno@arnorehn.de>
Date:   Sat Dec 3 17:57:43 2011 +0100

    fix a crash when generating the akonadi bindings
    
    BUG: 283677

diff --git a/type_compiler.cpp b/type_compiler.cpp
index 6ebf602..6e4ab70 100644
--- a/type_compiler.cpp
+++ b/type_compiler.cpp
@@ -191,6 +191,8 @@ void TypeCompiler::visitParameterDeclaration(ParameterDeclarationAST* node)
 
 void TypeCompiler::visitPtrOperator(PtrOperatorAST* node)
 {
+    if ( ! m_session->token_stream ) return;
+    if ( ! token_text(m_session->token_stream->kind(node->op)) ) return;
     if (token_text(m_session->token_stream->kind(node->op))[0] == '*') {
         QPair<bool, bool> cv = m_visitor->parseCv(node->cv);
         pointerDepth.append(cv.first);