Commit f84cbe43 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Don't crash on restoring a project with removed Qt version.

parent b6d34c08
......@@ -164,6 +164,8 @@ void MaemoPackageCreationWidget::setPackageManagerIcon()
void MaemoPackageCreationWidget::handleToolchainChanged()
{
if (!m_step->maemoToolChain())
return;
m_ui->skipCheckBox
->setVisible(m_step->maemoToolChain()->allowsPackagingDisabling());
m_ui->skipCheckBox->setChecked(!m_step->isPackagingEnabled());
......
......@@ -298,10 +298,12 @@ void MaemoRunConfigurationWidget::handleBuildConfigChanged()
void MaemoRunConfigurationWidget::handleToolchainChanged()
{
const bool remoteMountsAvailable
= m_runConfiguration->toolchain()->allowsRemoteMounts();
m_debugDetailsContainer->setVisible(remoteMountsAvailable);
m_mountDetailsContainer->setVisible(remoteMountsAvailable);
const MaemoToolChain * const toolChain = m_runConfiguration->toolchain();
if (toolChain) {
const bool remoteMountsAvailable = toolChain->allowsRemoteMounts();
m_debugDetailsContainer->setVisible(remoteMountsAvailable);
m_mountDetailsContainer->setVisible(remoteMountsAvailable);
}
m_runConfiguration->updateFactoryState();
}
......
......@@ -162,7 +162,8 @@ bool MaemoRunControlFactory::canRun(RunConfiguration *runConfiguration,
{
const MaemoRunConfiguration * const maemoRunConfig
= qobject_cast<MaemoRunConfiguration *>(runConfiguration);
if (!maemoRunConfig || !maemoRunConfig->deviceConfig().isValid())
if (!maemoRunConfig || !maemoRunConfig->deviceConfig().isValid()
|| !maemoRunConfig->toolchain())
return false;
const int freePortCount = maemoRunConfig->freePorts().count();
if (freePortCount == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment