Two functions, one label

Can you tell me about the scope of the widgets?

Let’s say in one function I create a label with one text (…label_create… …label_set_text…). And in another function I change its text (…label_set_text…). Everything crashes with me at the same time (garbage on the screen). Apparently, the scope of the label is limited by the first function, and the second function is doing wild things in RAM. But how to do it right?