NSReadPixel crash

  • I'm using NSReadPixel in a mouseMoved event on a view to read the
    color of a pixel where the mouse is and display it to the user. ON
    10.5 all is good. If i use the same images on 10.4, once in a while,
    i'll get a crash. And the log is not very helpfull, it just ends with
    the said function. In any case, here's how i'm getting the color:

    [self lockFocus];
    NSColor*    c = NSReadPixel(pt) // got point from a [self
    convertPoint ...] using the event from the mouseMoved message
    [self unlockFocus]

    What could cause NSReadPixel to crash straight out like that?

    thanks

    AC
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today