Merge topic 'cmake-server-fix-16422'

d0a707b3 server-mode: Prevent possible crash when watching directories
This commit is contained in:
Brad King 2016-11-15 09:25:58 -05:00 committed by CMake Topic Stage
commit fcfddc67ed

View File

@ -291,7 +291,7 @@ void on_directory_change(uv_fs_event_t* handle, const char* filename,
{
const cmIBaseWatcher* const watcher =
static_cast<const cmIBaseWatcher*>(handle->data);
const std::string pathSegment(filename);
const std::string pathSegment(filename ? filename : "");
watcher->Trigger(pathSegment, events, status);
}