Fix for "Cannot read property 'address' of undefined".

If there is no assembly for the current line, return instead of trying to access undefined
dev/git-series/gccdum
Rubén Rincón 6 years ago
parent a241b2d893
commit 335b5707bc

@ -274,6 +274,7 @@ define(function (require) {
Compiler.prototype.getBinaryForLine = function (line) {
var obj = this.assembly[line - 1];
if (!obj) return '<div class="address">????</div><div class="opcodes"><span class="opcode">????</span></div>';;
var address = obj.address ? obj.address.toString(16) : "";
var opcodes = '<div class="opcodes" title="' + (obj.opcodes || []).join(" ") + '">';
_.each(obj.opcodes, function (op) {

Loading…
Cancel
Save