forked from qt-creator/qt-creator
QmlDesigner: Fix crash with ADS
When pressing Ctrl + Shift + F in design mode the OutputPanePlaceHolder is requesting its splitter, which isn't set with ADS. To avoid nullptr access a check for the splitter before accessing. Change-Id: I3085bba23d4cf9bddcfec154e4557000d880600d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
284ff753f3
commit
044faadc2d
@@ -176,6 +176,8 @@ void OutputPanePlaceHolder::setHeight(int height)
|
|||||||
|
|
||||||
void OutputPanePlaceHolder::ensureSizeHintAsMinimum()
|
void OutputPanePlaceHolder::ensureSizeHintAsMinimum()
|
||||||
{
|
{
|
||||||
|
if (!d->m_splitter)
|
||||||
|
return;
|
||||||
Internal::OutputPaneManager *om = Internal::OutputPaneManager::instance();
|
Internal::OutputPaneManager *om = Internal::OutputPaneManager::instance();
|
||||||
int minimum = (d->m_splitter->orientation() == Qt::Vertical
|
int minimum = (d->m_splitter->orientation() == Qt::Vertical
|
||||||
? om->sizeHint().height() : om->sizeHint().width());
|
? om->sizeHint().height() : om->sizeHint().width());
|
||||||
|
Reference in New Issue
Block a user