Crash fix

This commit is contained in:
Joshua Granick
2018-07-19 21:53:14 -07:00
parent 984cb14650
commit b350c44e10
2 changed files with 2 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ namespace lime {
} else {
data = (Bytes*)malloc (sizeof (Bytes));
data = new Bytes ();
data->ReadFile (resource->path);
manager = new MySrcManager (data->b, data->length);
cinfo.src = &manager->pub;

View File

@@ -142,7 +142,7 @@ namespace lime {
} else {
data = (Bytes*)malloc (sizeof (Bytes));
data = new Bytes ();
data->ReadFile (resource->path);
ReadBuffer buffer (data->b, data->length);
png_set_read_fn (png_ptr, &buffer, user_read_data_fn);