From f8a3c71252911c9863448b653fbfe7e18e2c895d Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Mon, 26 Nov 2012 18:15:05 +0100 Subject: [PATCH] Some more fixes in extensions - Return always if the extension is not available --- lib/x11/ext/big-requests.js | 2 +- lib/x11/ext/composite.js | 2 +- lib/x11/ext/render.js | 2 +- lib/x11/ext/shape.js | 2 +- lib/x11/ext/xc-misc.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/x11/ext/big-requests.js b/lib/x11/ext/big-requests.js index 7e24cbb..19b61e9 100644 --- a/lib/x11/ext/big-requests.js +++ b/lib/x11/ext/big-requests.js @@ -7,7 +7,7 @@ exports.requireExt = function(display, callback) X.QueryExtension('BIG-REQUESTS', function(err, ext) { if (!ext.present) - callback(new Error('extension not available')); + return callback(new Error('extension not available')); ext.Enable = function( cb ) { diff --git a/lib/x11/ext/composite.js b/lib/x11/ext/composite.js index 7a41030..7e739de 100644 --- a/lib/x11/ext/composite.js +++ b/lib/x11/ext/composite.js @@ -20,7 +20,7 @@ exports.requireExt = function(display, callback) X.QueryExtension('Composite', function(err, ext) { if (!ext.present) - callback(new Error('extension not available')); + return callback(new Error('extension not available')); ext.Redirect = { Automatic: 0, diff --git a/lib/x11/ext/render.js b/lib/x11/ext/render.js index cfe6914..71dd6db 100644 --- a/lib/x11/ext/render.js +++ b/lib/x11/ext/render.js @@ -22,7 +22,7 @@ exports.requireExt = function(display, callback) if (!ext.present) { - callback(new Error('extension not available')); + return callback(new Error('extension not available')); } ext.QueryVersion = function(clientMaj, clientMin, callback) diff --git a/lib/x11/ext/shape.js b/lib/x11/ext/shape.js index 8374c15..acb54ba 100644 --- a/lib/x11/ext/shape.js +++ b/lib/x11/ext/shape.js @@ -17,7 +17,7 @@ exports.requireExt = function(display, callback) X.QueryExtension('SHAPE', function(err, ext) { if (!ext.present) - callback(new Error('extension not available')); + return callback(new Error('extension not available')); ext.Kind = { Bounding: 0, diff --git a/lib/x11/ext/xc-misc.js b/lib/x11/ext/xc-misc.js index c15fb8d..1f0bc42 100644 --- a/lib/x11/ext/xc-misc.js +++ b/lib/x11/ext/xc-misc.js @@ -9,7 +9,7 @@ exports.requireExt = function(display, callback) X.QueryExtension('XC-MISC', function(err, ext) { if (!ext.present) - callback(new Error('extension not available')); + return callback(new Error('extension not available')); ext.QueryVersion = function(clientMaj, clientMin, cb) {