src/ldDocument.cc

changeset 866
4951b737f8cb
parent 863
238082c94304
child 867
557cb07dbe57
equal deleted inserted replaced
865:6d68840fcb26 866:4951b737f8cb
224 224
225 // ============================================================================= 225 // =============================================================================
226 // 226 //
227 LDDocumentPtr FindDocument (QString name) 227 LDDocumentPtr FindDocument (QString name)
228 { 228 {
229 for (LDDocumentWeakPtr file : g_allDocuments) 229 for (LDDocumentWeakPtr weakfile : g_allDocuments)
230 { 230 {
231 if (file != null and file.toStrongRef()->name() == name) 231 if (weakfile == null)
232 return file.toStrongRef(); 232 continue;
233
234 LDDocumentPtr file (weakfile.toStrongRef());
235
236 if (Eq (name, file->name(), file->defaultName()))
237 return file;
233 } 238 }
234 239
235 return LDDocumentPtr(); 240 return LDDocumentPtr();
236 } 241 }
237 242

mercurial