~ubuntu-branches/ubuntu/trusty/libsdl2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/video/SDL_clipboard.c

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo
  • Date: 2013-12-28 12:31:19 UTC
  • mto: (7.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20131228123119-wehupm72qsjvh6vz
Tags: upstream-2.0.1+dfsg1
ImportĀ upstreamĀ versionĀ 2.0.1+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    if (_this->SetClipboardText) {
36
36
        return _this->SetClipboardText(_this, text);
37
37
    } else {
38
 
        if (_this->clipboard_text) {
39
 
            SDL_free(_this->clipboard_text);
40
 
        }
 
38
        SDL_free(_this->clipboard_text);
41
39
        _this->clipboard_text = SDL_strdup(text);
42
40
        return 0;
43
41
    }
67
65
    if (_this->HasClipboardText) {
68
66
        return _this->HasClipboardText(_this);
69
67
    } else {
70
 
        if ((_this->clipboard_text) && (SDL_strlen(_this->clipboard_text)>0)) {
 
68
        if (_this->clipboard_text && _this->clipboard_text[0] != '\0') {
71
69
            return SDL_TRUE;
72
70
        } else {
73
71
            return SDL_FALSE;