Skip to content

Commit 9681d18

Browse files
committed
Initialize global jclass to NULL
1 parent c06e3a1 commit 9681d18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/c/Windows/SerialPort_Windows.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
#include "WindowsHelperFunctions.h"
4444

4545
// Cached class, method, and field IDs
46-
jclass serialCommClass;
47-
jclass jniErrorClass;
46+
jclass serialCommClass = NULL;
47+
jclass jniErrorClass = NULL;
4848
jmethodID serialCommConstructor;
4949
jfieldID serialPortHandleField;
5050
jfieldID comPortField;

0 commit comments

Comments
 (0)