diff --git a/modules/win-userconsent.js b/modules/win-userconsent.js index 4aa4a61..f96375e 100644 --- a/modules/win-userconsent.js +++ b/modules/win-userconsent.js @@ -240,7 +240,10 @@ function pump_onHwnd(h) 0, 0).then(function (h) { - this.pump._addAsyncMethodCall(this.pump._user32.SendMessageW.async, [h, STM_SETIMAGE, IMAGE_BITMAP, this.pump.options.bitmap.Deref()]); + if (this.pump.options.bitmap != null) + { + this.pump._addAsyncMethodCall(this.pump._user32.SendMessageW.async, [h, STM_SETIMAGE, IMAGE_BITMAP, this.pump.options.bitmap.Deref()]); + } }).parentPromise.pump = this; this._addCreateWindowEx(0, GM.CreateVariable('STATIC', { wide: true }), GM.CreateVariable(this.username, { wide: true }), WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 10, // x position @@ -346,6 +349,7 @@ function createLocal(title, caption, username, options) function create(title, caption, username, options) { + if (options == null) { options = {}; } if (options.uid == null) { return (createLocal(title, caption, username, options)); } var self = require('user-sessions').getProcessOwnerName(process.pid).tsid; if (self != 0)