Branch: Tag:

2017-10-11

2017-10-11 10:07:28 by Karl Gustav Sterneberg <kg@roxen.com>

Fixed a null pointer exception.

999:    //    // Create the submonitor.    MON_WARN("Monitor lost for path %O.\n", full_path); -  monitor(full_path, m->flags | MF_AUTO | MF_HARD, +  m = monitor(full_path, m->flags | MF_AUTO | MF_HARD,    m->max_dir_check_interval,    m->file_interval_factor,    m->stable_time); -  m = monitors[full_path]; -  m->check(0); // Init monitor. +  // monitor() will not register monitor for path if filter_file() +  // returns 0. +  if (m) { +  m->check(0); // Init monitor.    }    }    } -  +  }       if (m) {    if (event == System.Inotify.IN_IGNORED) {
1328:   //!   //! @seealso   //! @[release()] - void monitor(string path, MonitorFlags|void flags, + Monitor|void monitor(string path, MonitorFlags|void flags,    int(0..)|void max_dir_check_interval,    int(0..)|void file_interval_factor,    int(0..)|void stable_time)
1359:    // NB: Registering with the monitor_queue is done as    // needed by register_path() as called by create().    } +  return m;   }      int filter_file(string path)