Changeset 199

Show
Ignore:
Timestamp:
06/26/09 08:24:44 (9 months ago)
Author:
erik
Message:

Make sure there is a glyph to restore when requested. When the background is empty, it will return None rather than a glyph.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Lib/robofab/objects/objectsFL.py

    r198 r199  
    419419                # copy the existing mask data first 
    420420                existingMask = getGlyphFromMask(targetGlyph) 
    421                 pen = FLPointContourPen(existingMask) 
    422                 existingMask.drawPoints(pen) 
     421                if existingMask is not None: 
     422                        pen = FLPointContourPen(existingMask) 
     423                        existingMask.drawPoints(pen) 
    423424        pen = FLPointContourPen(wrapped) 
    424425        maskGlyph.drawPoints(pen)               # draw the data