git-svn-id: svn://db.shs.com.ru/pip@595 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -360,9 +360,13 @@ void PIObject::piDisconnect(PIObject * src) {
|
|||||||
PIMutexLocker _ml(src->mutex_connect);
|
PIMutexLocker _ml(src->mutex_connect);
|
||||||
PIVector<PIObject * > cv = src->connectors.toVector();
|
PIVector<PIObject * > cv = src->connectors.toVector();
|
||||||
piForeach (PIObject * o, cv) {
|
piForeach (PIObject * o, cv) {
|
||||||
if (o == src) continue;
|
//piCout << "disconnect"<< src->className()<< o->className();
|
||||||
|
if (!o || (o == src)) continue;
|
||||||
|
if (!o->isPIObject()) continue;
|
||||||
#ifndef ANDROID
|
#ifndef ANDROID
|
||||||
|
# ifndef MAC_OS
|
||||||
PIMutexLocker _mld(o->mutex_connect, src != o);
|
PIMutexLocker _mld(o->mutex_connect, src != o);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
PIVector<__Connection> & oc(o->connections);
|
PIVector<__Connection> & oc(o->connections);
|
||||||
for (int i = 0; i < oc.size_s(); ++i) {
|
for (int i = 0; i < oc.size_s(); ++i) {
|
||||||
@@ -373,8 +377,10 @@ void PIObject::piDisconnect(PIObject * src) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
piForeachC (PIObject::__Connection & c, src->connections)
|
piForeachC (PIObject::__Connection & c, src->connections) {
|
||||||
|
if (!c.dest_o->isPIObject()) continue;
|
||||||
c.dest_o->connectors.remove(src);
|
c.dest_o->connectors.remove(src);
|
||||||
|
}
|
||||||
src->connections.clear();
|
src->connections.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user