Don't crash if smartplaylist wizard plugin is not found.
This commit is contained in:
parent
9f99cab314
commit
963b272c4b
|
@ -15,10 +15,11 @@
|
|||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "querywizardplugin.h"
|
||||
#include "ui_wizardfinishpage.h"
|
||||
#include "wizard.h"
|
||||
#include "wizardplugin.h"
|
||||
#include "ui_wizardfinishpage.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QRadioButton>
|
||||
|
@ -106,6 +107,11 @@ void Wizard::SetGenerator(GeneratorPtr gen) {
|
|||
finish_page_->ui_->name->setText(gen->name());
|
||||
finish_page_->ui_->dynamic->setChecked(gen->is_dynamic());
|
||||
|
||||
if (type_index_ == -1) {
|
||||
qLog(Error) << "Plugin was not found for generator type" << gen->type();
|
||||
return;
|
||||
}
|
||||
|
||||
// Tell the plugin to load
|
||||
plugins_[type_index_]->SetGenerator(gen);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue