8000 Merge pull request #3381 from tacaswell/qapp_global_fix · matplotlib/matplotlib@6e978d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e978d7

Browse files
committed
Merge pull request #3381 from tacaswell/qapp_global_fix
BUG : make qApp global before using it
2 parents 4a0965c + ce472ff commit 6e978d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ def _create_qApp():
125125
"""
126126
Only one qApp can exist at a time, so check before creating one.
127127
"""
128+
global qApp
128129

129130
if qApp is None:
130131
if DEBUG:
131132
print("Starting up QApplication")
132-
global qApp
133133
app = QtWidgets.QApplication.instance()
134134
if app is None:
135135
# check for DISPLAY env variable on X11 build of Qt

0 commit comments

Comments
 (0)
0