Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

run: QtGui.QApplication.instance() can return a defunct instance

The stderr scanning code was trying to open a bug report, but it was
finding a main app instance that was in the middle of being garbage
collected. This check method is more robust.

Changeset 480b991ef3d1

Parent a8ab8ecc7471

by Steve Borho

Changes to one file · Browse files at 480b991ef3d1 Showing diff from parent a8ab8ecc7471 Diff from another changeset...

 
292
293
294
 
295
296
297
298
 
 
299
300
301
 
292
293
294
295
296
297
298
 
299
300
301
302
303
@@ -292,10 +292,12 @@
  else:   return checkargs()   +mainapp = None  def qtrun(dlgfunc, ui, *args, **opts):   portable_fork(ui, opts)   - if QtGui.QApplication.instance(): + global mainapp + if mainapp:   dlg = dlgfunc(ui, *args, **opts)   if dlg:   dlg.show()