fix compilation warning

  Compilation warning:
  objectscript.cpp:11983:23: warning: passing NULL to non-pointer
  argument 1 ...