Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Defend against Gtk3 cursor new_from_name bug
On Ubuntu 16.10 and later, Gdk.Cursor raises a TypeError instead of
returning None as documented.
Fixes
File "/usr/share/sugar/activities/Paint.activity/Area.py", line 1754, in
set_tool_cursor
cursor = Gdk.Cursor.new_from_name(display, name)
TypeError: constructor returned NULL
Documentation reference:
https://lazka.github.io/pgi-docs/Gdk-3.0/classes/Cursor.html#Gdk.Cursor.new_from_name- Loading branch information