diff options
author | David Robillard <d@drobilla.net> | 2008-08-13 22:19:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-13 22:19:45 +0000 |
commit | 6d9179c30b56bb7be97e702951c393727d96cf05 (patch) | |
tree | e26667e3c8ba679c017b91c3c1bb5151ef3ef67a /src | |
parent | 96c22c9cdff5abb50d3653d352acfbbf345b96d2 (diff) | |
download | ingen-6d9179c30b56bb7be97e702951c393727d96cf05.tar.gz ingen-6d9179c30b56bb7be97e702951c393727d96cf05.tar.bz2 ingen-6d9179c30b56bb7be97e702951c393727d96cf05.zip |
Fix crash on 'clear' in plugin selector window.
git-svn-id: http://svn.drobilla.net/lad/ingen@1357 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/gui/LoadPluginWindow.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libs/gui/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp index fddb1396..f0754cb9 100644 --- a/src/libs/gui/LoadPluginWindow.cpp +++ b/src/libs/gui/LoadPluginWindow.cpp @@ -278,10 +278,15 @@ void LoadPluginWindow::plugin_selection_changed() { Gtk::TreeModel::iterator iter = _selection->get_selected(); - Gtk::TreeModel::Row row = *iter; - boost::shared_ptr<PluginModel> p = row.get_value(_plugins_columns._col_plugin_model); - _plugin_name_offset = _patch->child_name_offset(p->default_node_name()); - _node_name_entry->set_text(generate_module_name(_plugin_name_offset)); + if (iter) { + Gtk::TreeModel::Row row = *iter; + boost::shared_ptr<PluginModel> p = row.get_value(_plugins_columns._col_plugin_model); + _plugin_name_offset = _patch->child_name_offset(p->default_node_name()); + _node_name_entry->set_text(generate_module_name(_plugin_name_offset)); + } else { + _plugin_name_offset = 0; + _node_name_entry->set_text(""); + } } |