summaryrefslogtreecommitdiff
path: root/runtime/plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/plugin.cc')
-rw-r--r--runtime/plugin.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/plugin.cc b/runtime/plugin.cc
index 7d86f1d5dc..6f1c5179f9 100644
--- a/runtime/plugin.cc
+++ b/runtime/plugin.cc
@@ -28,10 +28,7 @@ const char* PLUGIN_INITIALIZATION_FUNCTION_NAME = "ArtPlugin_Initialize";
const char* PLUGIN_DEINITIALIZATION_FUNCTION_NAME = "ArtPlugin_Deinitialize";
Plugin::Plugin(const Plugin& other) : library_(other.library_), dlopen_handle_(nullptr) {
- if (other.IsLoaded()) {
- std::string err;
- Load(&err);
- }
+ CHECK(!other.IsLoaded()) << "Should not copy loaded plugins.";
}
bool Plugin::Load(/*out*/std::string* error_msg) {