fix headless tests

This commit is contained in:
Konstantin Käfer
2014-09-30 17:28:42 +02:00
parent a9039cf5d7
commit 8fcc74e253
11 changed files with 104 additions and 104 deletions

View File

@@ -10,7 +10,7 @@ namespace mbgl {
FileSource::FileSource(uv_loop_t *loop_, const std::string &path)
: thread_id(uv_thread_self()),
store(util::ptr<SQLiteStore>(new SQLiteStore(loop_, path))),
store(!path.empty() ? util::ptr<SQLiteStore>(new SQLiteStore(loop_, path)) : nullptr),
loop(loop_),
queue(new uv_messenger_t) {
@@ -18,6 +18,7 @@ FileSource::FileSource(uv_loop_t *loop_, const std::string &path)
std::unique_ptr<std::function<void()>> fn { reinterpret_cast<std::function<void()> *>(ptr) };
(*fn)();
});
uv_unref((uv_handle_t *)&queue->async);
}
FileSource::~FileSource() {