Can someone tell me what is wrong with this code?
BlitzMax Forums/MaxGUI Module/Can someone tell me what is wrong with this code?| 
 | ||
| I get the error...Unhandled Exception:Attempt to access field or method of Null object ...at SetImageFont. What gives? 
Global ffont:TImageFont
Global filename:String
Function btnChangeFont_GA(Button:TGadget) 
			filename = RequestFile("Select Font", "Font Files:ttf", False, "C:\Windows\Fonts\") 
			ffont = LoadImageFont(filename, 48, SMOOTHFONT) 
			SetImageFont(ffont) 
End Function
 | 
| 
 | ||
| Do you have Graphics enabled yet? LoadImageFont only works once Graphics have been initialised. | 
| 
 | ||
| I did have it placed before the graphics command. Thanks!! Wasted a hour on that one. Man that's frustrating. |