Also check if the toggle ref is conected to the corect ObjectG
instance. This fixes a warning printed to stderr about a missing toggle ref, and a possible memory leak. We may want to check the actual toggle ref data instead of assuming we have the correct instence if the "gObject" data equals this.
Showing with 10 additions and 2 deletions