]> git.saurik.com Git - wxWidgets.git/blame - src/common/webviewfshandler.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / webviewfshandler.cpp
CommitLineData
81a887a8
DS
1/////////////////////////////////////////////////////////////////////////////
2// Name: webviewfshandler.cpp
3// Purpose: Custom webview handler for virtual file system
4// Author: Nick Matthews
5// Id: $Id$
6// Copyright: (c) 2012 Steven Lamerton
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#if wxUSE_WEBVIEW
14
15#if defined(__BORLANDC__)
16 #pragma hdrstop
17#endif
18
19#include "wx/webviewfshandler.h"
20#include "wx/filesys.h"
21
22wxWebViewFSHandler::wxWebViewFSHandler(const wxString& scheme) :
23 wxWebViewHandler(scheme)
24{
25 m_fileSystem = new wxFileSystem();
26}
27
28wxWebViewFSHandler::~wxWebViewFSHandler()
29{
30 wxDELETE(m_fileSystem);
31}
32
33wxFSFile* wxWebViewFSHandler::GetFile(const wxString &uri)
34{
35 return m_fileSystem->OpenFile(uri);
36}
37
38#endif // wxUSE_WEBVIEW