Changeset 9148 in project


Ignore:
Timestamp:
03/02/08 23:48:22 (12 years ago)
Author:
hans
Message:

directfb: check against multiple releases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/2/directfb/trunk/directfb.scm

    r8124 r9148  
    410410
    411411(define (dfb-release dfb)
    412   ($dfb$ IDirectFB dfb Release ()))
     412  (when (dfb-interface-pointer dfb)
     413    ($dfb$ IDirectFB dfb Release ())
     414    (dfb-interface-pointer-set! dfb #f)))
    413415
    414416(define (dfb-set-cooperative-level dfb level)
     
    604606
    605607(define (dfbs-release surf)
    606   ($dfb$ IDirectFBSurface surf Release ()))
     608  (when (dfbs-interface-pointer surf)
     609    ($dfb$ IDirectFBSurface surf Release ())
     610    (dfbs-interface-pointer-set! surf #f)))
    607611
    608612
     
    657661
    658662(define (dfbid-release idev)
    659   ($dfb$ IDirectFBInputDevice idev Release ()))
     663  (when (dfbid-interface-pointer idev)
     664    ($dfb$ IDirectFBInputDevice idev Release ())
     665    (dfbid-interface-pointer-set! idev #f)))
    660666
    661667
     
    714720
    715721(define (dfbeb-release eb)
    716   ($dfb$ IDirectFBEventBuffer eb Release ()))
     722  (when (dfbeb-interface-pointer eb)
     723    ($dfb$ IDirectFBEventBuffer eb Release ())
     724    (dfbeb-interface-pointer-set! eb #f)))
    717725
    718726(define (dfbeb-wait/get-event eb)
     
    735743
    736744(define (dfbip-release ip)
    737   ($dfb$ IDirectFBImageProvider ip Release ()))
     745  (when (dfbip-interface-pointer ip)
     746    ($dfb$ IDirectFBImageProvider ip Release ())
     747    (dfbip-interface-pointer-set! ip #f)))
    738748
    739749
     
    851861
    852862(define (dfbvp-release vp)
    853   ($dfb$ IDirectFBVideoProvider vp Release ()))
     863  (when (dfbvp-interface-pointer vp)
     864    ($dfb$ IDirectFBVideoProvider vp Release ())
     865    (dfbvp-interface-pointer-set! vp #f)))
    854866
    855867
     
    913925
    914926(define (dfbf-release font)
    915   ($dfb$ IDirectFBFont font Release ()))
     927  (when (dfbf-interface-pointer font)
     928    ($dfb$ IDirectFBFont font Release ())
     929    (dfbf-interface-pointer-set! font #f)))
Note: See TracChangeset for help on using the changeset viewer.