Sitelet https://github.com/gephi/gephi/pull/3200
Skip to content

Fix NPE in setEditMode when Attributes model is null - #3200

Merged
mbastian merged 1 commit into
masterfrom
fix/attributes-set-edit-mode-null
May 9, 2026
Merged

mbastian merged 1 commit into
masterfrom
fix/attributes-set-edit-mode-null

Conversation

@mbastian

@mbastian mbastian commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

  • When the Edit tool is deselected without a project loaded, it calls disableEdit → setEditMode on AttributesUIControllerImpl
  • setEditMode was missing the null guard on getModel() that every other method in the class has, causing NPE
  • One-line fix: add if (model == null) { return; } consistent with setSelectedNodes, setSelectedEdges, and resetSelection

Fixes GEPHI-5HP (7 users, 15 events)

Test plan

  • Start Gephi with no project, activate the Edit tool, then deselect it — no NPE
  • Normal edit-mode toggle with a project open — behaviour unchanged

🤖 Generated with Claude Code

The Edit tool calls disableEdit on unselect regardless of whether a project
is open. setEditMode was missing the null guard present on every other method
in the class, causing NPE when the Attributes panel has no model yet.

Fixes GEPHI-5HP

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mbastian mbastian added this to the 0.11.2 milestone May 9, 2026
@mbastian
mbastian merged commit ce1254e into master May 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant