summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llkeyframemotionparam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/llkeyframemotionparam.cpp')
-rw-r--r--indra/llcharacter/llkeyframemotionparam.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp
index c0af6250c2..a9c1f6fc45 100644
--- a/indra/llcharacter/llkeyframemotionparam.cpp
+++ b/indra/llcharacter/llkeyframemotionparam.cpp
@@ -354,7 +354,9 @@ BOOL LLKeyframeMotionParam::loadMotions()
// open the file
//-------------------------------------------------------------------------
S32 fileSize = 0;
- apr_file_t* fp = ll_apr_file_open(path, LL_APR_R, &fileSize);
+ LLAPRFile infile ;
+ infile.open(path, LL_APR_R, NULL, &fileSize);
+ apr_file_t* fp = infile.getFileHandle() ;
if (!fp || fileSize == 0)
{
llinfos << "ERROR: can't open: " << path << llendl;
@@ -366,7 +368,6 @@ BOOL LLKeyframeMotionParam::loadMotions()
if ( !text )
{
llinfos << "ERROR: can't allocated keyframe text buffer." << llendl;
- apr_file_close(fp);
return FALSE;
}
@@ -393,7 +394,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
//-------------------------------------------------------------------------
// close the file
//-------------------------------------------------------------------------
- apr_file_close( fp );
+ infile.close();
//-------------------------------------------------------------------------
// check for error