We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f24027 commit 095a376Copy full SHA for 095a376
packages/desktop_drop/windows/desktop_drop_plugin.cpp
@@ -138,11 +138,16 @@ namespace {
138
registrar->messenger(), "desktop_drop",
139
&flutter::StandardMethodCodec::GetInstance());
140
141
- HWND hwnd;
+ HWND hwnd = nullptr;
142
if (registrar->GetView()) {
143
hwnd = registrar->GetView()->GetNativeWindow();
144
}
145
146
+ if (hwnd == nullptr) {
147
+ // no window, no drop.
148
+ return;
149
+ }
150
+
151
channel->SetMethodCallHandler([](const auto &call, auto result) {
152
result->NotImplemented();
153
});
0 commit comments