Fix potential crash activating integration dialog on Linux
This commit is contained in:
parent
c98570ca4b
commit
5b8b515b06
1 changed files with 4 additions and 3 deletions
|
@ -564,8 +564,9 @@ Zotero.Integration = new function() {
|
|||
var children = ctypes.cast(childrenPtr, ctypes.uint32_t.array(nChildrenJS).ptr).contents;
|
||||
var foundWindow = false;
|
||||
for(var i=0; i<nChildrenJS; i++) {
|
||||
foundWindow = _X11FindWindow(display, children.addressOfElement(i).contents,
|
||||
searchName);
|
||||
var testWin = children.addressOfElement(i).contents;
|
||||
if(testWin == 0) continue;
|
||||
foundWindow = _X11FindWindow(display, testWin, searchName);
|
||||
if(foundWindow) break;
|
||||
}
|
||||
|
||||
|
@ -2997,4 +2998,4 @@ Zotero.Integration.URIMap.prototype.getZoteroItemForURIs = function(uris) {
|
|||
}
|
||||
|
||||
return [zoteroItem, needUpdate];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue