Avoid a segfault in `load_plugin`

Before that patch `accepted_keywords` was a dangling reference to an
object that was destroyed at the end of the constructor of the class
`Polyhedron_demo`.

Now, that `QStringList` is copied, but it is a short list of short
strings.
This commit is contained in:
Laurent Rineau 2019-05-29 11:42:35 +02:00
parent e3a4db56f6
commit cdb72b9f34
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ private:
bool bbox_need_update; bool bbox_need_update;
QMap<QString, QPair<QStringList, QString> >plugin_metadata_map; QMap<QString, QPair<QStringList, QString> >plugin_metadata_map;
QMap<QString, bool> ignored_map; QMap<QString, bool> ignored_map;
const QStringList& accepted_keywords; QStringList accepted_keywords;
private: private:
QMap<QAction*, QMenu*> action_menu_map; QMap<QAction*, QMenu*> action_menu_map;