It looks like the intent of this is to 'give' the caller the result (which is s_popup_dialog_text), therefore this should be:
```
r_result = s_popup_dialog_text;
s_popup_dialog_text = nil;
```