|
From: <arn...@us...> - 2007-12-23 22:35:15
|
Revision: 951
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=951&view=rev
Author: arnetheduck
Date: 2007-12-23 14:35:08 -0800 (Sun, 23 Dec 2007)
Log Message:
-----------
crash fix
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2007-12-23 20:29:57 UTC (rev 950)
+++ dcplusplus/trunk/changelog.txt 2007-12-23 22:35:08 UTC (rev 951)
@@ -5,6 +5,7 @@
* Fixed a crash when right-clicking in own file list
* [ADC] Searches filtered by token if available so that each search window only gets its own results
* [ADC] Implemented test version of bloom filters which will dramatically reduce hub bandwidth usage for TTH searches
+* Fixed a crash with partial list browsing
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2007-12-23 20:29:57 UTC (rev 950)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2007-12-23 22:35:08 UTC (rev 951)
@@ -274,7 +274,6 @@
void DirectoryListingFrame::refreshTree(const tstring& root) {
HoldRedraw hold(dirs);
-
HTREEITEM ht = findItem(treeRoot, root);
if(ht == NULL) {
ht = treeRoot;
@@ -286,12 +285,12 @@
while((next = dirs->getChild(ht)) != NULL) {
dirs->erase(next);
}
-
updateTree(d, ht);
dirs->select(NULL);
selectItem(root);
+ dcdebug("selected");
dirs->expand(treeRoot);
}
@@ -674,8 +673,12 @@
}
void DirectoryListingFrame::handleSelectionChanged() {
+ ItemInfo* ii = dirs->getSelectedData();
+ if(!ii) {
+ return;
+ }
- DirectoryListing::Directory* d = dirs->getSelectedData()->dir;
+ DirectoryListing::Directory* d = ii->dir;
if(d == 0) {
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|