Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-11400

ReactOS paint is not protected by wrong settings.

    XMLWordPrintable

Details

    Description

      After going into CORE-11399, I tried to launch the ReactOS mspaint and I got many errors. This happens because all settings in:

      HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\View

      have been set to zero (CW_USEDEFAULT to be more precise) by Microsoft paint. So, the CreateDIBSection() with size of zero in DIB.CPP returns NULL and all calls to GetObject() on NULL objects return values without sense.

      In my opinion, the fixes to be done are:

      1) test into RegistrySettings::Load() if a value read form the registry is CW_USEDEFAULT and in this case restore the previous value.

      2) test the return value of CreateDIBWithProperties(): if it returns NULL, then try to force defaults by calling RegistrySettings::LoadPresets() and then calling CreateDIBWithProperties() again. If it still fails, print the error and exits.

      Attachments

        Activity

          People

            gyROS Benedikt Freisen
            Carlo Bramix Carlo Bramix
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: