hetelek / Velocity

A cross-platform application built using the Qt framework that allows you to browse and edit Xbox 360 files.
GNU General Public License v3.0
163 stars 47 forks source link

Fixes issue #3 #4

Closed landaire closed 11 years ago

landaire commented 11 years ago

The Issue

Issue #3 was caused by the freeing of the io pointer in the GameGPD class. On line 116 of gpduploader.cpp, the GameGPD::CleanGPD method is called, which calls the XDBF::Clean method. In this method, the io pointer is freed, then is set to a newly allocated FileIO instance.

When the io is set, it doesn't set the io instance in the class which called the Clean method (GameGPD), resulting in GameGPD referencing io referencing a bad memory address.

The Solution

By making XDBF's io public, we can then reset the GameGPD io after calling XDBF::Clean.