FreeBASIC  0.91.0
error_ptrchk.c
Go to the documentation of this file.
1 /* null pointer checking function */
2 
3 #include "fb.h"
4 
5 /*:::::*/
6 FBCALL void *fb_NullPtrChk( void *ptr, int linenum, const char *fname )
7 {
8  if( ptr == NULL )
9  return (void *)fb_ErrorThrowEx( FB_RTERROR_NULLPTR, linenum, fname, NULL, NULL );
10  else
11  return NULL;
12 }