diff options
Diffstat (limited to 'testing/toxic')
-rw-r--r-- | testing/toxic/chat.c | 1 | ||||
-rw-r--r-- | testing/toxic/main.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index 936eb868..ff7a1667 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c | |||
@@ -256,6 +256,5 @@ ToxWindow new_chat(int friendnum) { | |||
256 | x->friendnum = friendnum; | 256 | x->friendnum = friendnum; |
257 | 257 | ||
258 | ret.x = (void*) x; | 258 | ret.x = (void*) x; |
259 | free(x); | ||
260 | return ret; | 259 | return ret; |
261 | } | 260 | } |
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index e0e23708..45760b1c 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -288,7 +288,9 @@ int main(int argc, char* argv[]) { | |||
288 | ToxWindow* a; | 288 | ToxWindow* a; |
289 | 289 | ||
290 | for(i = 0; i < argc; i++) { | 290 | for(i = 0; i < argc; i++) { |
291 | if(argv[i][0] == '-') { | 291 | if (argv[i] == NULL){ |
292 | break; | ||
293 | } else if(argv[i][0] == '-') { | ||
292 | if(argv[i][1] == 'f') { | 294 | if(argv[i][1] == 'f') { |
293 | if(argv[i + 1] != NULL) | 295 | if(argv[i + 1] != NULL) |
294 | filename = argv[i + 1]; | 296 | filename = argv[i + 1]; |