juceString crash


#1

I saw that juceString (jstring) crashes if it gets  a NULL jstring, is it that intended? if so, why?


#2

Well, it's not designed to accept null pointers, and that's deliberate. But it's an internal function.. are you just asking this out of interest, or have you actually found a place where it's being given a null pointer by mistake? If so, let me know the stack trace and I'll fix it!


#3

I wanted to make sure that this is not a bug, when you get some objects from jni you could get NULL and this function will crash. For now I just have a if statement checking if it is null or not 


#4

It's only my own code which should ever call that function, and it should never pass it a null pointer, so if you've found a place where I've made a mistake and allowed that to happen, please tell me where it is!


#5

I did my own JNI method and I wanted to parse the jstring to juce::String, but when I used tje juceString it crashed if I was sending NULL, but to me it make sense how it is now :)