Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Fries committed May 19, 2009
1 parent 232eb82 commit 7f26206
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ std::string yatcClipboard::getText()
{
#ifdef WIN32
OpenClipboard(GetActiveWindow());
std::string ret = (const char*)GetClipboardData(CF_TEXT);
const char* str = (const char*)GetClipboardData(CF_TEXT);
if(str == NULL)
return "";
std::string ret = str;
CloseClipboard();
return ret;
#elif defined(__APPLE__)
Expand Down

0 comments on commit 7f26206

Please sign in to comment.