Fixed server crash on device file download.

Ylian Saint-Hilaire committed Nov 14, 2020 at 22:14 UTC fd93edf0eb3b5978397d0197bb107d6829793c03
1 file changed +1 -1
meshdevicefile.js
+1 -1
@@ -202,7 +202,7 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us
202 }
203 } else {
204 // HTTP connection, Send message to other peers that we have this connection
205 - parent.parent.multiServer.DispatchMessage(JSON.stringify({ action: 'relay', id: obj.id }));
205 + if (parent.parent.multiServer != null) { parent.parent.multiServer.DispatchMessage(JSON.stringify({ action: 'relay', id: obj.id })); }
206 return;
207 }
208 }