dnd: Don't pass null to ClutterActor.disconnect()
_ungrabActor disconnects the event signal handler but does not check whether it is connected before doing so which can result into an exception like: JS ERROR: !!! Exception was: Error: disconnect() takes one arg, the signal handler id JS ERROR: !!! lineNumber = '0' JS ERROR: !!! fileName = 'gjs_throw' JS ERROR: !!! stack = 'Error("disconnect() takes one arg, the signal handler id")@:0
This commit is contained in:
parent
e9e30138bd
commit
7c534a87cf
@ -144,6 +144,8 @@ _Draggable.prototype = {
|
|||||||
|
|
||||||
_ungrabActor: function() {
|
_ungrabActor: function() {
|
||||||
Clutter.ungrab_pointer();
|
Clutter.ungrab_pointer();
|
||||||
|
if (!this._onEventId)
|
||||||
|
return;
|
||||||
this.actor.disconnect(this._onEventId);
|
this.actor.disconnect(this._onEventId);
|
||||||
this._onEventId = null;
|
this._onEventId = null;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user