GPF on SetDIBits ?

I'm having some problems with SetDIBits on Dephi 1.
I'm getting (seemingly) random GPFs when calling SetDIBits with
the code:

    tmp:=LMG_bitmap.handle;
    SetDIBits(LMG_bitmap.canvas.handle,
              tmp,
              0,
              LMG_height,
              LMG_buffer,
              TBitmapInfo((@LMG_bitmapinfo)^),
              DIB_RGB_COLORS);

LMG_bitmap is a TBitmap and LMG_bitmapinfo is initialied correctly as
far as I know.
It doesn't always GPF and sometimes just fails (returns 0) even though
memory allocation etc is succesfull... Any ideas.
Also do some video-cards/systems not support SetDIBits ?
Any info greatly received .

Charlie