summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-06 18:01:38 +0000
committerDavid Robillard <d@drobilla.net>2011-09-06 18:01:38 +0000
commite18380569bdbe1926be7540f3e2f9ebdf49a8e70 (patch)
treef6e70547cba7786d6026bc4b1c8e7c99e961104b /src
parentce1d4bd5cc4c1f22a613cbf7bf392c6266a4e7f5 (diff)
downloadingen-e18380569bdbe1926be7540f3e2f9ebdf49a8e70.tar.gz
ingen-e18380569bdbe1926be7540f3e2f9ebdf49a8e70.tar.bz2
ingen-e18380569bdbe1926be7540f3e2f9ebdf49a8e70.zip
Fix crash when clicking patch modules (fix #769).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3459 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/NodeModule.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index f178a6c7..d087b883 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -416,7 +416,10 @@ NodeModule::set_selected(bool b)
if (b) {
PatchWindow* win = app.window_factory()->parent_patch_window(node());
if (win) {
- const std::string& doc = node()->plugin_model()->documentation();
+ std::string doc;
+ if (node()->plugin_model()) {
+ doc = node()->plugin_model()->documentation();
+ }
if (!doc.empty()) {
win->doc_textview()->get_buffer()->set_text(doc);
win->doc_textview()->show();