Skip to content

Commit 895da05

Browse files
authored
fix(core, windows): remove unused map of string that was causing a crash (#11745)
1 parent edddc1d commit 895da05

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ void FirebaseCorePlugin::RegisterWithRegistrar(
4040
registrar->AddPlugin(std::move(plugin));
4141
}
4242

43-
std::map<std::string, std::vector<std::string>> apps;
44-
4543
FirebaseCorePlugin::FirebaseCorePlugin() {}
4644

4745
FirebaseCorePlugin::~FirebaseCorePlugin() = default;
@@ -103,20 +101,6 @@ void FirebaseCorePlugin::InitializeApp(
103101
App::Create(PigeonFirebaseOptionsToAppOptions(initialize_app_request),
104102
app_name.c_str());
105103

106-
auto app_it = apps.find(app_name);
107-
108-
// If the app is already in the map, return the stored shared_ptr
109-
if (app_it == apps.end()) {
110-
std::vector<std::string> app_vector;
111-
app_vector.push_back(app_name);
112-
app_vector.push_back(initialize_app_request.api_key());
113-
app_vector.push_back(initialize_app_request.app_id());
114-
app_vector.push_back(*initialize_app_request.database_u_r_l());
115-
app_vector.push_back(initialize_app_request.project_id());
116-
117-
apps[app_name] = app_vector;
118-
}
119-
120104
// Send back the result to Flutter
121105
result(AppToPigeonInitializeResponse(*app));
122106
}

packages/firebase_core/firebase_core/windows/firebase_core_plugin.h

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class FirebaseCorePlugin : public flutter::Plugin,
5757

5858
private:
5959
bool coreInitialized = false;
60-
static std::map<std::string, std::vector<std::string>> firebase_apps;
6160
};
6261

6362
} // namespace firebase_core_windows

0 commit comments

Comments
 (0)