Fix crash when closing D3D9 window
Fix crash when closing D3D9 window
This commit is contained in:
parent
469c8713b8
commit
78a1c42162
|
@ -1256,7 +1256,6 @@ void GameArea::OnIdle(wxIdleEvent& event)
|
|||
|
||||
if (panel->d3dframe != NULL) {
|
||||
panel->d3dframe->Bind(VBAM_EVT_USER_INPUT, &GameArea::OnUserInput, this);
|
||||
panel->d3dframe->Bind(wxEVT_CLOSE_WINDOW, &GameArea::OnD3DClose, this);
|
||||
}
|
||||
|
||||
// set up event handlers
|
||||
|
@ -1412,14 +1411,6 @@ static Display* GetX11Display() {
|
|||
}
|
||||
#endif // __WXGTK__
|
||||
|
||||
void GameArea::OnD3DClose(wxCloseEvent& ev)
|
||||
{
|
||||
(void)ev;
|
||||
|
||||
delete panel->d3dframe;
|
||||
panel->d3dframe = NULL;
|
||||
}
|
||||
|
||||
void GameArea::OnUserInput(widgets::UserInputEvent& event) {
|
||||
bool emulated_key_pressed = false;
|
||||
for (const auto& event_data : event.data()) {
|
||||
|
@ -2319,9 +2310,6 @@ SDLDrawingPanel::~SDLDrawingPanel()
|
|||
{
|
||||
if (did_init)
|
||||
{
|
||||
if (d3dframe != NULL)
|
||||
delete d3dframe;
|
||||
|
||||
if (sdlwindow != NULL)
|
||||
SDL_DestroyWindow(sdlwindow);
|
||||
|
||||
|
|
|
@ -546,7 +546,6 @@ protected:
|
|||
void EraseBackground(wxEraseEvent& ev);
|
||||
void OnSize(wxSizeEvent& ev);
|
||||
void OnKillFocus(wxFocusEvent& ev);
|
||||
void OnD3DClose(wxCloseEvent& ev);
|
||||
|
||||
#ifndef NO_FFMPEG
|
||||
recording::MediaRecorder snd_rec, vid_rec;
|
||||
|
|
Loading…
Reference in New Issue