Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 499:44ab626bb866
Fix possibly uninitialised variable
author | Chris Cannam |
---|---|
date | Mon, 30 Jan 2012 16:39:40 +0000 |
parents | d2a58dfc3ae5 |
children | d09a396cde80 |
comparison
equal
deleted
inserted
replaced
498:d2a58dfc3ae5 | 499:44ab626bb866 |
---|---|
3435 LayerFactory::LayerType type = i->second.layer; | 3435 LayerFactory::LayerType type = i->second.layer; |
3436 | 3436 |
3437 LayerFactory::LayerTypeSet emptyTypes = | 3437 LayerFactory::LayerTypeSet emptyTypes = |
3438 LayerFactory::getInstance()->getValidEmptyLayerTypes(); | 3438 LayerFactory::getInstance()->getValidEmptyLayerTypes(); |
3439 | 3439 |
3440 Layer *newLayer; | 3440 Layer *newLayer = 0; |
3441 | 3441 |
3442 if (emptyTypes.find(type) != emptyTypes.end()) { | 3442 if (emptyTypes.find(type) != emptyTypes.end()) { |
3443 | 3443 |
3444 newLayer = m_document->createEmptyLayer(type); | 3444 newLayer = m_document->createEmptyLayer(type); |
3445 if (newLayer) { | 3445 if (newLayer) { |