Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
a0909989
Commit
a0909989
authored
Feb 10, 2009
by
Roberto Raggi
Browse files
Fixes: Possible crash in completeMember.
parent
ae7c99eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppcodecompletion.cpp
View file @
a0909989
...
...
@@ -578,6 +578,8 @@ bool CppCodeCompletion::completeFunction(FullySpecifiedType exprTy,
QSet
<
QString
>
signatures
;
foreach
(
TypeOfExpression
::
Result
p
,
resolvedTypes
)
{
FullySpecifiedType
ty
=
p
.
first
;
if
(
!
ty
)
continue
;
if
(
Function
*
fun
=
ty
->
asFunctionType
())
{
if
(
TextEditor
::
CompletionItem
item
=
toCompletionItem
(
fun
))
{
QString
signature
;
...
...
@@ -600,7 +602,7 @@ bool CppCodeCompletion::completeFunction(FullySpecifiedType exprTy,
bool
CppCodeCompletion
::
completeMember
(
const
QList
<
TypeOfExpression
::
Result
>
&
results
,
const
LookupContext
&
context
)
{
if
(
results
.
isEmpty
())
if
(
results
.
isEmpty
()
||
!
results
.
first
().
first
)
return
false
;
TypeOfExpression
::
Result
result
=
results
.
first
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment