diff --git a/src/robotjs.cc b/src/robotjs.cc index bd2598bd..4e79a3b6 100644 --- a/src/robotjs.cc +++ b/src/robotjs.cc @@ -662,10 +662,11 @@ NAN_METHOD(getColor) color = MMRGBHexAtPoint(bitmap, x, y); - //destroyMMBitmap(bitmap); char hex[7]; padHex(color, hex); + + destroyMMBitmap(bitmap); info.GetReturnValue().Set(Nan::New(hex).ToLocalChecked());