WidgetInspectorServer: Fix dangling pointer