OSDN Git Service

・作ってもいないオブジェクトを参照しているバグがあったので修正。
authoryoffy <yoffy>
Wed, 26 Nov 2003 03:48:46 +0000 (03:48 +0000)
committeryoffy <yoffy>
Wed, 26 Nov 2003 03:48:46 +0000 (03:48 +0000)
Favorite.pas

index 3482f44..1603877 100644 (file)
@@ -145,10 +145,8 @@ end;
 
 function       TFavoriteThreadItem.GetItem : TThreadItem;
 var
-       threadItem      : TThreadItem;
        board                           : TBoard;
        boardURL                : string;
-       i                                               : Integer;
 begin
 
        if FItem = nil then begin
@@ -267,7 +265,6 @@ end;
 procedure TFavoriteDM.ReadNode(Node: IXMLNode);
 var
        i: Integer;
-       j, jBound : Integer;
 
        ParentNode: TTreeNode;
        CurrentNode: TTreeNode;
@@ -276,7 +273,6 @@ var
        FavThread: TFavoriteThreadItem;
        board                           : TBoard;
        threadItem      : TThreadItem;
-       url                                     : string;
 begin
        if Node.NodeName = 'folder' then begin
                ParentNode := FStack.Peek;
@@ -298,6 +294,7 @@ begin
                        ParentNode := FStack.Peek;
                        if TObject(ParentNode.Data) is TFavoriteFolder then begin
                                if Node.Attributes['favtype'] = 'board' then begin
+                                       FavBoard := nil;
                                        // \8b\8c\8e®\82Ì\82¨\8bC\82É\93ü\82è\82Æ\82Ì\8cÝ\8a·\90«\82Ì\82½\82ß
                                        if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin
                                                board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
@@ -306,7 +303,7 @@ begin
                                                                board.URL, Node.Attributes[ 'title' ], board );
                                        end else begin
                                                FavBoard := TFavoriteBoardItem.Create(
-                                                       Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], board );
+                                                       Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
                                        end;
                                        CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard);
                                        CurrentNode.ImageIndex := 15;
@@ -332,7 +329,7 @@ begin
                                                        threadItem.URL, Node.Attributes[ 'title' ], threadItem );
                                        end else begin
                                                FavThread := TFavoriteThreadItem.Create(
-                                                       Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], threadItem );
+                                                       Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
                                        end;
                                        CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread);
                                        CurrentNode.ImageIndex := 16;