diff --git a/src/robotjs.cc b/src/robotjs.cc index b34a45b8..51b24fa3 100644 --- a/src/robotjs.cc +++ b/src/robotjs.cc @@ -610,6 +610,11 @@ NAN_METHOD(setKeyboardDelay) NAN_METHOD(getPixelColor) { + if (info.Length() != 2) + { + return Nan::ThrowError("Invalid number of arguments."); + } + MMBitmapRef bitmap; MMRGBHex color;