fr-window: Assertion check to prevent ptr dereference

* clang static analysis shows that if this function
  is called with file_list set to NULL, it would be
  dereferenced.