From 6306424102d348e32467c05d10e1a3b6f859723a 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 45cd56c6..98feafa9 100644 --- a/src/org/libsdl/app/SDLActivity.java +++ b/src/org/libsdl/app/SDLActivity.java @@ -270,7 +270,7 @@ public class SDLActivity extends Activity { return; } - mVibrator.cancel(); + if( mVibrator != null ) mVibrator.cancel(); SDLActivity.handlePause(); } @@ -319,7 +319,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();