[gnome-shell] dnd: Don't pass null to ClutterActor.disconnect()
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dnd: Don't pass null to ClutterActor.disconnect()
- Date: Mon, 28 Feb 2011 21:41:25 +0000 (UTC)
commit 7c534a87cfe8aeee220d068115a51c5281f3f5af
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Feb 28 22:34:19 2011 +0100
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
js/ui/dnd.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 021cb2e..61776da 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -144,6 +144,8 @@ _Draggable.prototype = {
_ungrabActor: function() {
Clutter.ungrab_pointer();
+ if (!this._onEventId)
+ return;
this.actor.disconnect(this._onEventId);
this._onEventId = null;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]