summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/natkeyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/natkeyboard.cpp')
-rw-r--r--src/emu/natkeyboard.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp
index 17782815d22..c3c05f0e9fb 100644
--- a/src/emu/natkeyboard.cpp
+++ b/src/emu/natkeyboard.cpp
@@ -585,17 +585,10 @@ void natural_keyboard::post_coded(const std::string &text, const attotime &rate)
void natural_keyboard::paste()
{
// retrieve the clipboard text
- char *text = osd_get_clipboard_text();
+ std::string text = osd_get_clipboard_text();
- // was a result returned?
- if (text != nullptr)
- {
- // post the text
- post_utf8(text);
-
- // free the string
- free(text);
- }
+ // post the text
+ post_utf8(text);
}