Skip to content

Commit

Permalink
FIX: [droid] safeguard files via jni
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Jan 26, 2018
1 parent f001bfb commit 42c0394
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/platform/android/activity/JNIXBMCFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "CompileInfo.h"

#include "Application.h"
#include "utils/log.h"
#include "utils/FileUtils.h"

Expand Down Expand Up @@ -59,6 +60,9 @@ jboolean CJNIXBMCFile::_open(JNIEnv *env, jobject thiz, jstring path)
{
std::string strPath = jcast<std::string>(jhstring::fromJNI(path));

if (!g_application.IsInitialized())
return false;

if (find_instance(thiz))
return false;

Expand Down

0 comments on commit 42c0394

Please sign in to comment.