pixel-saver icon indicating copy to clipboard operation
pixel-saver copied to clipboard

Missing safety checks for guessWindowXID()

Open marcohu opened this issue 9 years ago • 1 comments

guessWindowXID() can return null, but the return value is not always safe-guarded which can potentially lead to errors as some code expects it to be non-null.

marcohu avatar May 01 '16 21:05 marcohu

Test case:

  • disable Pixel Saver
  • Reload GNOME-Shell (Alt+F2 r)
  • Start Meld
  • Create two files pal.txt and pal1.txt
  • Compare these two files with Meld
  • Start an additional Meld instance (to have two application windows, the 2nd window must appear above the first one, that is key)
  • Enable Pixel Saver
    -> Warnings appear in the log
  • Disable Pixel Saver
    -> Error

marcohu avatar May 01 '16 22:05 marcohu