summaryrefslogtreecommitdiff
path: root/kde-unstable/kdebindings-smokegen/fix-crash.patch
blob: 5864da3f3f7a36932433611a4d2e3885d40b92ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff -up smokegen-4.7.0/parser/type_compiler.cpp.orig smokegen-4.7.0/parser/type_compiler.cpp
diff -up smokegen-4.7.0/type_compiler.cpp.orig smokegen-4.7.0/type_compiler.cpp
--- smokegen-4.7.0/type_compiler.cpp.orig	2011-08-02 14:34:08.000000000 +0200
+++ smokegen-4.7.0/type_compiler.cpp	2011-08-02 14:34:34.000000000 +0200
@@ -191,6 +191,8 @@ void TypeCompiler::visitParameterDeclara
 
 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);