Fix type check for pointer detection in volshell

Replaced `member_type.vol.object_class == objects.Pointer` with `isinstance(member_type, objects.Pointer)`
to identify pointer types consistently. Thanks to @ikelos for the suggestion!
This commit is contained in:
eve
2025-03-28 12:42:24 +00:00
parent 2415e98510
commit f060e3b8ae
+1 -1
View File
@@ -399,7 +399,7 @@ class Volshell(interfaces.plugins.PluginInterface):
a pointer otherwise it returns just the normal type name."""
pointer_marker = "*" * depth
try:
if member_type.vol.object_class == objects.Pointer:
if isinstance(member_type, objects.Pointer):
sub_member_type = member_type.vol.subtype
# follow at most MAX_DEREFERENCE_COUNT pointers. A guard against, hopefully unlikely, infinite loops
if depth < MAX_DEREFERENCE_COUNT: