Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv19517/src/gui
Modified Files:
wxMainFrame.cpp
Log Message:
don't deallocate the search struct before the end of the search preparation -- fixes
the crash when searching in more than one folder
Index: wxMainFrame.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMainFrame.cpp,v
retrieving revision 1.153
retrieving revision 1.154
diff -b -u -2 -r1.153 -r1.154
--- wxMainFrame.cpp 23 Jul 2002 18:47:12 -0000 1.153
+++ wxMainFrame.cpp 23 Jul 2002 23:57:56 -0000 1.154
@@ -254,4 +254,6 @@
m_nMatchingMessages =
m_nMatchingFolders = 0;
+
+ m_allScheduled = false;
}
@@ -278,4 +280,8 @@
}
+ // tell us that AddSearchFolder() won't be called any more, must be called
+ // before the search results are shown!
+ void FinalizeSearch() { m_allScheduled = true; }
+
// process the search result if it concerns this search, in which case true
// is returned (even if there were errors), otherwise return false to
@@ -348,5 +354,6 @@
// if we're still waiting for the completion of [another] search, return
// false, otherwise return true
- bool IsSearchCompleted() const { return m_listSingleSearch.empty(); }
+ bool IsSearchCompleted() const
+ { return m_allScheduled && m_listSingleSearch.empty(); }
// show the search results to the user
@@ -457,4 +464,8 @@
// the number of folders containing the matching messages
size_t m_nMatchingFolders;
+
+ // have all folders we search been already added to us using
+ // AddSearchFolder()?
+ bool m_allScheduled;
};
@@ -1050,4 +1061,10 @@
}
//else: silently skip this one
+ }
+
+ if ( searchData )
+ {
+ // no more calls to AddSearchFolder() scheduled
+ searchData->FinalizeSearch();
}
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates