Skip to content

Commit

Permalink
Fixed bug on unload of index
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Jun 19, 2013
1 parent c510987 commit b37713c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.orientechnologies.orient.core.profiler.OJVMProfiler;
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.ORecordInternal;
import com.orientechnologies.orient.core.storage.OStorageEmbedded;
import com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeProvider;

/**
Expand Down Expand Up @@ -256,7 +257,7 @@ public void unload() {
root = null;

final ODatabaseRecord db = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined();
if (db != null && !db.isClosed()) {
if (db != null && !db.isClosed() && db.getStorage() instanceof OStorageEmbedded) {
// RELOAD IT
try {
load();
Expand Down

0 comments on commit b37713c

Please sign in to comment.