Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 862
    • Issues 862
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 40
    • Merge requests 40
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !1517

GWin32RegistryKey: Move assertions

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged LRN requested to merge lrn/glib:win32reg-assertions into master Jun 04, 2020
  • Overview 4
  • Commits 1
  • Pipelines 2
  • Changes 1

While these assertions look right at the first glance, they actually crash the program. That's because GObject insists on initializing all construct-only properties to their default values, which results in g_win32_registry_key_set_property() being called multiple times with NULL string, once for each unset property.

If "path" is actually set by the caller, a subsequent call to set "path-utf16" to NULL will fail an assertion, since absolute_path is already non-NULL.

With assertions moved the set-to-NULL calls bail out before an assertion is made.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: win32reg-assertions