Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a329dcd

Browse filesBrowse files
committed
Fix crash in _draw_rotated_text in Gdk backend.
1 parent 97f7130 commit a329dcd
Copy full SHA for a329dcd

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/backends/backend_gdk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_gdk.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ def _draw_rotated_text(self, gc, x, y, s, prop, angle):
228228
if x < 0 or y < 0: # window has shrunk and text is off the edge
229229
return
230230

231+
if x + w > self.width or y + h > self.height:
232+
return
233+
231234
key = (x,y,s,angle,hash(prop))
232235
imageVert = self.rotated.get(key)
233236
if imageVert != None:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.