cppit / jucipp

A lightweight & cross-platform IDE supporting the most recent C++ standards. This project has moved to https://gitlab.com/cppit/jucipp.
https://gitlab.com/cppit/jucipp
MIT License
883 stars 98 forks source link

Segfaults when opening bare git repository #343

Closed zalox closed 7 years ago

zalox commented 7 years ago

Steps to reproduce (on arch):

git clone repo --bare dir
juci dir
Segmentation fault (core dumped)

The segfault happens here:

boost::filesystem::path Git::Repository::get_work_path() noexcept {
  std::lock_guard<std::mutex> lock(mutex);
  // because repository is nullptr
  return Git::path(git_repository_workdir(repository.get()));
}

@eidheim Could you take a look at this since I'm not familiar with libgit2?