From ad89985e7ed0efea17e9f0245edd7434d04317dc Mon Sep 17 00:00:00 2001 From: Dario Casalinuovo Date: Tue, 21 Jun 2016 17:07:45 +0200 Subject: [PATCH] PluginManager: Assign the BBufferIO pointer --- src/kits/media/PluginManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kits/media/PluginManager.cpp b/src/kits/media/PluginManager.cpp index 948198199c..80855666cc 100644 --- a/src/kits/media/PluginManager.cpp +++ b/src/kits/media/PluginManager.cpp @@ -102,12 +102,13 @@ public: if (!IsMedia() && fBufferIO == NULL) { // Source needs to be at least a BPositionIO to wrap with a BBufferIO if (IsPosition()) { - fPosition = new(std::nothrow) BBufferIO(fPosition, 65536, false); - if (fPosition == NULL) { + fBufferIO = new(std::nothrow) BBufferIO(fPosition, 65536, false); + if (fBufferIO == NULL) { fErr = B_NO_MEMORY; return; } - // We have to reset our BDataIO reference too + // We have to reset our parents reference too + fPosition = dynamic_cast(fBufferIO); fData = dynamic_cast(fPosition); } else { // In this case we have to supply our own form