mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
JNI: Don't call HALInitialize() within an assert().
If built without asserts enabled (e.g. -DNDEBUG), HALInitialize won't get called. Instead call outside the assert and then do the assert. Change-Id: I51546b9f9fc9a74f8a3a732c4b754257d9697e46
This commit is contained in:
@@ -256,7 +256,8 @@ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCommun
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCommunicationsLibrary_FRCNetworkCommunicationReserve
|
||||
(JNIEnv *, jclass)
|
||||
{
|
||||
assert(1 == HALInitialize(0));
|
||||
int rv = HALInitialize(0);
|
||||
assert(1 == rv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user