Commit 68de7e50 authored by Dennis Nienhüser's avatar Dennis Nienhüser

Fix "QObject::disconnect: Unexpected null parameter" warning in stderr

parent b6546aa9
......@@ -717,7 +717,9 @@ void ElevationProfileFloatItem::switchToTrackDataSource(int index)
void ElevationProfileFloatItem::switchDataSource(ElevationProfileDataSource* source)
{
disconnect(m_activeDataSource, SIGNAL(dataUpdated(GeoDataLineString,QVector<QPointF>)),0,0);
if (m_activeDataSource) {
disconnect(m_activeDataSource, SIGNAL(dataUpdated(GeoDataLineString,QVector<QPointF>)),0,0);
}
m_activeDataSource = source;
connect(m_activeDataSource, SIGNAL(dataUpdated(GeoDataLineString,QVector<QPointF>)), this, SLOT(handleDataUpdate(GeoDataLineString,QVector<QPointF>)));
m_activeDataSource->requestUpdate();
......
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