Skip to content

Commit 4a337d0

Browse files
jpnurmichaselatta
authored andcommitted
Fix FlTextInputPlugin tear down (flutter#22007)
1 parent 8937855 commit 4a337d0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

shell/platform/linux/fl_text_input_plugin.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,6 @@ static void method_call_cb(FlMethodChannel* channel,
423423
}
424424
}
425425

426-
static void view_weak_notify_cb(gpointer user_data, GObject* object) {
427-
FlTextInputPlugin* self = FL_TEXT_INPUT_PLUGIN(object);
428-
self->view = nullptr;
429-
}
430-
431426
static void fl_text_input_plugin_dispose(GObject* object) {
432427
FlTextInputPlugin* self = FL_TEXT_INPUT_PLUGIN(object);
433428

@@ -438,6 +433,7 @@ static void fl_text_input_plugin_dispose(GObject* object) {
438433
delete self->text_model;
439434
self->text_model = nullptr;
440435
}
436+
self->view = nullptr;
441437

442438
G_OBJECT_CLASS(fl_text_input_plugin_parent_class)->dispose(object);
443439
}
@@ -483,7 +479,6 @@ FlTextInputPlugin* fl_text_input_plugin_new(FlBinaryMessenger* messenger,
483479
fl_method_channel_set_method_call_handler(self->channel, method_call_cb, self,
484480
nullptr);
485481
self->view = view;
486-
g_object_weak_ref(G_OBJECT(view), view_weak_notify_cb, self);
487482

488483
return self;
489484
}

0 commit comments

Comments
 (0)