Changeset 12544


Ignore:
Timestamp:
Aug 6, 2009, 5:51:55 PM (10 years ago)
Author:
rme
Message:

Guard access to styles slot in text storage object (for benefit of
xhemlock-text-storage subclass).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-listener.lisp

    r12526 r12544  
    441441         (listener-name (hi::buffer-name (hemlock-buffer self)))
    442442         (path (#/windowTitleForDocumentDisplayName: controller (#/displayName self ))))
    443     (with-slots (styles) textstorage
    444       ;; We probably should be more disciplined about
    445       ;; Cocoa memory management.  Having retain/release in
    446       ;; random places all over the code is going to get
    447       ;; unwieldy.
    448       (#/release styles)
    449       (setf styles (#/retain listener-styles)))
     443    (when (slot-exists-p textstorage 'styles)
     444      (with-slots (styles) textstorage
     445        ;; We probably should be more disciplined about
     446        ;; Cocoa memory management.  Having retain/release in
     447        ;; random places all over the code is going to get
     448        ;; unwieldy.
     449        (#/release styles)
     450        (setf styles (#/retain listener-styles))))
    450451    ;; Disabling background layout on listeners is an attempt to work
    451452    ;; around a bug.  The bug's probably gone ...
Note: See TracChangeset for help on using the changeset viewer.