Skip to content
GitLab
Menu
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
61e7ffc9
Commit
61e7ffc9
authored
Jun 26, 2009
by
dt
Browse files
toolChain() might return a null pointer
Don't crash then
parent
6f675c28
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/projectloadwizard.cpp
View file @
61e7ffc9
...
...
@@ -122,7 +122,6 @@ void ProjectLoadWizard::addBuildConfiguration(QString name, QtVersion *qtversion
m_project
->
setQtVersion
(
name
,
0
);
else
m_project
->
setQtVersion
(
name
,
qtversion
->
uniqueId
());
}
void
ProjectLoadWizard
::
done
(
int
result
)
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
61e7ffc9
...
...
@@ -400,12 +400,14 @@ ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfigurat
QString
Qt4Project
::
makeCommand
(
const
QString
&
buildConfiguration
)
const
{
return
toolChain
(
buildConfiguration
)
->
makeCommand
();
ToolChain
*
tc
=
toolChain
(
buildConfiguration
);
return
tc
?
tc
->
makeCommand
()
:
"make"
;
}
QString
Qt4Project
::
defaultMakeTarget
(
const
QString
&
buildConfiguration
)
const
{
return
toolChain
(
buildConfiguration
)
->
defaultMakeTarget
();
ToolChain
*
tc
=
toolChain
(
buildConfiguration
);
return
tc
?
toolChain
(
buildConfiguration
)
->
defaultMakeTarget
()
:
""
;
}
void
Qt4Project
::
updateCodeModel
()
...
...
@@ -740,7 +742,9 @@ ProjectExplorer::Environment Qt4Project::baseEnvironment(const QString &buildCon
{
Environment
env
=
useSystemEnvironment
(
buildConfiguration
)
?
Environment
::
systemEnvironment
()
:
Environment
();
qtVersion
(
buildConfiguration
)
->
addToEnvironment
(
env
);
toolChain
(
buildConfiguration
)
->
addToEnvironment
(
env
);
ToolChain
*
tc
=
toolChain
(
buildConfiguration
);
if
(
tc
)
tc
->
addToEnvironment
(
env
);
return
env
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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