File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -734,17 +734,17 @@ class BMP
734
734
// Convert object from Javascript to a C++ class (BMP).
735
735
BMP buildBMP (Local<Object> info)
736
736
{
737
- Local<Object> obj = Nan::To<v8::Object>(info).ToLocalChecked ();
738
-
737
+ char * buf = NULL ;
739
738
BMP img;
739
+ Local<Object> obj = Nan::To<v8::Object>(info).ToLocalChecked ();
740
740
741
741
img.width = obj->Get (Nan::New (" width" ).ToLocalChecked ())->Uint32Value ();
742
742
img.height = obj->Get (Nan::New (" height" ).ToLocalChecked ())->Uint32Value ();
743
743
img.byteWidth = obj->Get (Nan::New (" byteWidth" ).ToLocalChecked ())->Uint32Value ();
744
744
img.bitsPerPixel = obj->Get (Nan::New (" bitsPerPixel" ).ToLocalChecked ())->Uint32Value ();
745
745
img.bytesPerPixel = obj->Get (Nan::New (" bytesPerPixel" ).ToLocalChecked ())->Uint32Value ();
746
746
747
- char * buf = node::Buffer::Data (obj->Get (Nan::New (" image" ).ToLocalChecked ()));
747
+ buf = node::Buffer::Data (obj->Get (Nan::New (" image" ).ToLocalChecked ()));
748
748
749
749
// Convert the buffer to a uint8_t which createMMBitmap requires.
750
750
img.image = (uint8_t *)malloc (img.byteWidth * img.height );
You can’t perform that action at this time.
0 commit comments