[VALGRING] error in some system access
This commit is contained in:
parent
e3dc686ec9
commit
2330788ace
@ -714,7 +714,7 @@ void appl::Buffer::setHighlightType(const std::string& _type) {
|
||||
|
||||
void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64_t _nbAdded) {
|
||||
// prevent ERROR...
|
||||
if (nullptr == m_highlight) {
|
||||
if (m_highlight == nullptr) {
|
||||
return;
|
||||
}
|
||||
// prevent No data Call
|
||||
@ -777,7 +777,7 @@ void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64
|
||||
|
||||
// update position after the range position :
|
||||
int64_t elemStart;
|
||||
if (startId == -1) {
|
||||
if (startId <= -1) {
|
||||
elemStart = 0;
|
||||
} else {
|
||||
elemStart = startId+1;
|
||||
|
@ -84,6 +84,14 @@ namespace appl {
|
||||
};
|
||||
private:
|
||||
void requestDestroyFromChild(const std::shared_ptr<Object>& _child);
|
||||
public:
|
||||
// generic iterators:
|
||||
std::list<std::shared_ptr<appl::Buffer>>::const_iterator begin() const {
|
||||
return m_list.begin();
|
||||
}
|
||||
std::list<std::shared_ptr<appl::Buffer>>::const_iterator end() const {
|
||||
return m_list.end();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -27,18 +27,17 @@ void appl::WorkerSaveAllFile::init() {
|
||||
return;
|
||||
}
|
||||
// List all current open file :
|
||||
for (int32_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
std::shared_ptr<appl::Buffer> tmpBuffer = m_bufferManager->get(iii);
|
||||
if (tmpBuffer == nullptr) {
|
||||
for (auto &it : *m_bufferManager) {
|
||||
if (it == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (tmpBuffer->isModify() == false) {
|
||||
if (it->isModify() == false) {
|
||||
continue;
|
||||
}
|
||||
if (tmpBuffer->hasFileName() == false) {
|
||||
m_bufferNameList.push_back(tmpBuffer->getFileName());
|
||||
if (it->hasFileName() == false) {
|
||||
m_bufferNameList.push_back(it->getFileName());
|
||||
} else {
|
||||
tmpBuffer->storeFile();
|
||||
it->storeFile();
|
||||
}
|
||||
}
|
||||
// checkif an element has something to do in the queue
|
||||
|
@ -102,9 +102,11 @@ class MainApplication : public ewol::context::Application {
|
||||
//_context.getEObjectManager().multiCast().anonymousSend(ednMsgCtagsLoadFile, name);
|
||||
} else {
|
||||
etk::FSNode file(tmpppp);
|
||||
std::string name = file.getName();
|
||||
APPL_INFO("need load file : \"" << name << "\"" );
|
||||
m_bufferManager->open(name);
|
||||
if (file.getNodeType() == etk::FSN_FILE) {
|
||||
std::string name = file.getName();
|
||||
APPL_INFO("need load file : \"" << name << "\"" );
|
||||
m_bufferManager->open(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user