ToolStatus: Fix toolbar graph plugin name check
@@ -97,14 +97,17 @@ VOID ToolbarGraphSaveSettings(
if (!(graph->Flags & TOOLSTATUS_GRAPH_ENABLED))
continue;
- pluginName = PhGetPluginName(graph->Plugin);
+ pluginName = graph->Plugin ? PhGetPluginName(graph->Plugin) : NULL;
+
PhAppendFormatStringBuilder(
&graphListBuilder,
L"%lu|%lu|%s|",
graph->GraphId,
graph->Flags & TOOLSTATUS_GRAPH_ENABLED ? 1 : 0,
- graph->Plugin ? pluginName->Buffer : L""
+ PhGetStringOrEmpty(pluginName)
);
+
+ if (pluginName)
PhDereferenceObject(pluginName);
}
