From 14e54ceda8154db0a26c632e7d0c18f19f3c4621 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 10 Dec 2021 09:20:47 -0800 Subject: [PATCH] Fixed so if image is not specified, it won't try to paint --- modules/win-userconsent.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)