Skip to content

Commit 9fbcdfc

Browse files
authored
Merge pull request #20 from nuang-ee/master
Fixed typo, and added sanity check of instantiation on FtcEventCallback::event_source_func
2 parents 98e14a9 + 271da13 commit 9fbcdfc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/src/core/Clipboard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void Clipboard::sendThread(char *toNetwrokIp, char *sendData, unsigned int dataL
165165

166166
try
167167
{
168-
if (! toNetwrokIp || ! sendData || sendData <= 0) {
168+
if (! toNetwrokIp || ! sendData || dataLen <= 0) {
169169
throw std::runtime_error("");
170170
}
171171

src/src/ui/FtcEventCallback.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ static gboolean event_source_func(gpointer data){
6464
EventCustom *evt = nullptr ;
6565
int loopCount = 0 ;
6666
Ftc::Core::EventManager *manager = Ftc::Core::EventManager::getInstance();
67+
if (manager == nullptr) return rv;
6768

6869
do {
6970
if (loopCount > 3) break ;

0 commit comments

Comments
 (0)