1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-28 14:13:37 +00:00

Fixed so if image is not specified, it won't try to paint

This commit is contained in:
Bryan Roe
2021-12-10 09:20:47 -08:00
parent 4a481db743
commit 14e54ceda8

View File

@@ -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)