summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-11 03:49:32 +0000
committerDavid Robillard <d@drobilla.net>2012-01-11 03:49:32 +0000
commit5efc7ae9c304d7e01cc00291e0857ced7d3582ba (patch)
tree95952f5f1e49a3c6190291add106e96d90a11c86 /src/port.c
parentb666782d06fc2cd9fe810b3fdbf13cc3949f6927 (diff)
downloadganv-5efc7ae9c304d7e01cc00291e0857ced7d3582ba.tar.gz
ganv-5efc7ae9c304d7e01cc00291e0857ced7d3582ba.tar.bz2
ganv-5efc7ae9c304d7e01cc00291e0857ced7d3582ba.zip
Fix crash on shutdown and item deletion.
Use Item add and remove virtual methods for adding/removing ports instead of special explicit functions. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3933 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/port.c b/src/port.c
index d220601..e8e6754 100644
--- a/src/port.c
+++ b/src/port.c
@@ -273,6 +273,8 @@ ganv_port_new(GanvModule* module,
GanvPort* port = GANV_PORT(
g_object_new(ganv_port_get_type(), NULL));
+ port->impl->is_input = is_input;
+
GanvItem* item = GANV_ITEM(port);
va_list args;
va_start(args, first_prop_name);
@@ -281,8 +283,6 @@ ganv_port_new(GanvModule* module,
first_prop_name, args);
va_end(args);
- port->impl->is_input = is_input;
-
GanvBox* box = GANV_BOX(port);
box->impl->radius_tl = (is_input ? 0.0 : 4.0);
box->impl->radius_tr = (is_input ? 4.0 : 0.0);
@@ -309,7 +309,6 @@ ganv_port_new(GanvModule* module,
}
}
- ganv_module_add_port(module, port);
return port;
}