fix NullPointerException bug when exit app after screen capture

if(ref == null || ref.get() == null) {
    ref.get().cancel(true);
}
where condition should be
ref != null && ref.get() != null
also cause by copy & paste problem!!!