[PR #201] [MERGED] Fix V3083 warnings from PVS-Studio Static Analyzer #1089

Closed
opened 2026-02-26 09:33:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NickeManarin/ScreenToGif/pull/201
Author: @spirifoxy
Created: 10/26/2017
Status: Merged
Merged: 10/27/2017
Merged by: @NickeManarin

Base: masterHead: V3083_fix


📝 Commits (1)

  • a59ba90 Fix V3083 warnings from PVS-Studio Static Analyzer

📊 Changes

6 files changed (+12 additions, -16 deletions)

View changed files

📝 GifRecorder/Util/UserActivityHook.cs (+4 -4)
📝 Other/HookTest/Util/UserActivityHook.cs (+4 -4)
📝 ScreenToGif/Controls/ImageScrollViewer.cs (+1 -2)
📝 ScreenToGif/Controls/SpectrumSlider.cs (+1 -4)
📝 ScreenToGif/Util/ActivityHook/UserActivityHook.cs (+1 -1)
📝 ScreenToGif/Webcam/DirectX/CaptureWebcam.cs (+1 -1)

📄 Description

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug found using PVS-Studio. Warnings:

  • V3083 Unsafe invocation of event 'ZoomChanged', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. ImageScrollViewer.cs 70
  • V3083 Unsafe invocation of event 'AfterSelecting', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. SpectrumSlider.cs 82
  • V3083 Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 828
  • V3083 Unsafe invocation of event 'CaptureFrameEvent', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. CaptureWebcam.cs 622
  • V3083 Unsafe invocation of event 'OnMouseActivity', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 712
  • V3083 Unsafe invocation of event 'KeyDown', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 760
  • V3083 Unsafe invocation of event 'KeyPress', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 783
  • V3083 Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 796
  • V3083 Unsafe invocation of event 'OnMouseActivity', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 768
  • V3083 Unsafe invocation of event 'KeyDown', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 816
  • V3083 Unsafe invocation of event 'KeyPress', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 841
  • V3083 Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 855

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NickeManarin/ScreenToGif/pull/201 **Author:** [@spirifoxy](https://github.com/spirifoxy) **Created:** 10/26/2017 **Status:** ✅ Merged **Merged:** 10/27/2017 **Merged by:** [@NickeManarin](https://github.com/NickeManarin) **Base:** `master` ← **Head:** `V3083_fix` --- ### 📝 Commits (1) - [`a59ba90`](https://github.com/NickeManarin/ScreenToGif/commit/a59ba903b248ea23850db0bc615cee919be7b72b) Fix V3083 warnings from PVS-Studio Static Analyzer ### 📊 Changes **6 files changed** (+12 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `GifRecorder/Util/UserActivityHook.cs` (+4 -4) 📝 `Other/HookTest/Util/UserActivityHook.cs` (+4 -4) 📝 `ScreenToGif/Controls/ImageScrollViewer.cs` (+1 -2) 📝 `ScreenToGif/Controls/SpectrumSlider.cs` (+1 -4) 📝 `ScreenToGif/Util/ActivityHook/UserActivityHook.cs` (+1 -1) 📝 `ScreenToGif/Webcam/DirectX/CaptureWebcam.cs` (+1 -1) </details> ### 📄 Description I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug found using PVS-Studio. Warnings: - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'ZoomChanged', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. ImageScrollViewer.cs 70 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'AfterSelecting', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. SpectrumSlider.cs 82 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 828 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'CaptureFrameEvent', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. CaptureWebcam.cs 622 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'OnMouseActivity', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 712 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyDown', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 760 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyPress', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 783 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 796 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'OnMouseActivity', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 768 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyDown', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 816 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyPress', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 841 - [V3083 ](https://www.viva64.com/en/w/v3083/)Unsafe invocation of event 'KeyUp', NullReferenceException is possible. Consider assigning event to a local variable before invoking it. UserActivityHook.cs 855 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 09:33:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1089
No description provided.