From 39c4cfdf8114decc584576e898782781da9c3356 Mon Sep 17 00:00:00 2001 From: a1batross Date: Wed, 9 Dec 2015 00:45:19 +0300 Subject: [PATCH] Fix crash --- src/org/libsdl/app/SDLActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/libsdl/app/SDLActivity.java b/src/org/libsdl/app/SDLActivity.java index 6021e80d..6b8df199 100644 --- a/src/org/libsdl/app/SDLActivity.java +++ b/src/org/libsdl/app/SDLActivity.java @@ -265,7 +265,7 @@ public class SDLActivity extends Activity { return; } - mVibrator.cancel(); + if( mVibrator != null ) mVibrator.cancel(); SDLActivity.handlePause(); } @@ -314,7 +314,7 @@ public class SDLActivity extends Activity { protected void onDestroy() { Log.v("SDL", "onDestroy()"); - mVibrator.cancel(); + if( mVibrator != null ) mVibrator.cancel(); if (SDLActivity.mBrokenLibraries) { super.onDestroy();