fontforge/fontforge — pull request #1754 by tshinnic (2014-09-28 04:25:39+00:00)
Title: Guard against CharView UI Hints/View menu crashes

This change implements the strategy "disallow user actions when they
are not appropriate - disable inappropriate UI menu items". Thus we
add code that checks whether the current charview display layer is
'Guide' and disables menu items that are known to crash when 'Guide'
is selected.

This addresses *one* aspect of issue #1750 "Crash when clearing stem hints from Guide layer"

This change adds disabling of the following charview menu items when
the 'Guide' layer is selected:

Hints menu
Hint Substitution Pts
Clear HStem
Clear VStem
Clear DStem
Create HHint...
Create VHint...
View / Number Points menu (all items)
None
TrueType
PostScript
SVG
Position

This is not necessarily an exhaustive list of all vulnerable UI actions,
just those which were proven to crash either always or 'sometimes'.

Tested as not affecting the menu items when 'Back' or 'Fore' layers are
selected.

Note that this change does **not** correct the vulnerable internal
routines. (*That will be another change*) This change merely prevents
those vulnerable routines from being reached by user menu actions known
to be 'bad'.

*The patient says, "Doctor, it hurts when I do this." "Then don't do that!"*