aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/html.cc12
-rw-r--r--src/html_common.hh1
2 files changed, 4 insertions, 9 deletions
diff --git a/src/html.cc b/src/html.cc
index 334e50db..fd76adf2 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -467,8 +467,6 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
attr_data = dStr_sized_new(1024);
- parse_finished = false;
-
/* Init page-handling variables */
forms = new misc::SimpleVector <DilloHtmlForm*> (1);
inputs_outside_form = new misc::SimpleVector <DilloHtmlInput*> (1);
@@ -511,8 +509,7 @@ DilloHtml::~DilloHtml()
{
_MSG("::~DilloHtml(this=%p)\n", this);
- if (!parse_finished)
- freeParseData();
+ freeParseData();
a_Bw_remove_doc(bw, this);
@@ -571,10 +568,12 @@ void DilloHtml::write(char *Buf, int BufSize, int Eof)
dFree(aux);
#endif
+ /* Update Start_Buf. It may be used after the parser is stopped */
+ Start_Buf = Buf;
+
dReturn_if (dw == NULL);
dReturn_if (stop_parser == TRUE);
- Start_Buf = Buf;
token_start = Html_write_raw(this, buf, bufsize, Eof);
Start_Ofs += token_start;
}
@@ -629,9 +628,6 @@ void DilloHtml::finishParsing(int ClientKey)
}
/* Remove this client from our active list */
a_Bw_close_client(bw, ClientKey);
-
- freeParseData();
- parse_finished = true;
}
/*
diff --git a/src/html_common.hh b/src/html_common.hh
index aaab4861..143b9458 100644
--- a/src/html_common.hh
+++ b/src/html_common.hh
@@ -217,7 +217,6 @@ public: //BUG: for now everything is public
int32_t visited_color;
private:
- bool parse_finished;
void freeParseData();
void initDw(); /* Used by the constructor */