mirror of
https://github.com/Adamcake/Bolt.git
synced 2026-04-25 03:16:59 -04:00
resource_handler: fix potential double-free
This commit is contained in:
@@ -49,8 +49,10 @@ bool Browser::ResourceHandler::Skip(int64 bytes_to_skip, int64& bytes_skipped, C
|
||||
}
|
||||
|
||||
void Browser::ResourceHandler::Cancel() {
|
||||
this->cursor = this->data_len;
|
||||
this->finish();
|
||||
if (this->cursor != this->data_len) {
|
||||
this->cursor = this->data_len;
|
||||
this->finish();
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefResourceHandler> Browser::ResourceHandler::GetResourceHandler(CefRefPtr<CefBrowser>, CefRefPtr<CefFrame>, CefRefPtr<CefRequest>) {
|
||||
|
||||
Reference in New Issue
Block a user