The call to this.getGraphics() will return null if the component is not visible (i.e. the panel has been added to a JFrame which is not currently set to visible at the time the thread is running). My guess is that finalGraphics is null at the time finalGraphics.drawImage(bfi,0,0,null); is being called. As far as I know, a call to getGraphics (or the preferred createGraphics as TheChubu pointed out) of a BufferedImage object should not return null.
Also, unless there's a reason you aren't currently, I'd consider using the BufferStrategy class that the Java library provides for double-buffering. See the links below for examples of usage in an active-rendering loop. Hope that helps!