Commit 405b66cebf64e989e30afbd345e26b8d98a22116
receivedSat, 30. Sep 2023, 17:22:28 (by user sx)
Sat, 30 Sep 2023 15:22:28 +0000 (17:22 +0200)
authorManfred Steiner <sx@htl-kaindorf.at>
Sat, 30 Sep 2023 15:22:25 +0000 (17:22 +0200)
committerManfred Steiner <sx@htl-kaindorf.at>
Sat, 30 Sep 2023 15:22:25 +0000 (17:22 +0200)
3 files changed:
README.md
examples/simuc/Makefile
examples/simuc/src/simavr/simavr.cpp

index 5566debbda9852ffff32ade89f7ebebcb4a0acda..265da2f89b2c4087bce8a3720ed70ed7af850547 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ This repository is mirrored from [https://github.com/buserror/simavr.git](https:
 ```sh
 $ sudo apt install gcc make gcc-avr avr-libc git
 $ sudo apt install libelf-dev
-$ sudo apt install freeglut3 freeglut3-dev
+$ sudo apt install freeglut3-dev
 $ sudo apt install libncurses5 libncurses5-dev
 ```
 
index e3ee48d512b2d1c4c3a57cb67c26ecdb41760f67..c8d1971407f7466d1f1a5edd775a741e97176115 100644 (file)
@@ -73,6 +73,7 @@ deb: dpkg $(DEBSRC)/DEBIAN/control $(DEBSRC)/usr/share/doc/htl-simuc/readme
 .PHONY: $(DEBSRC)/DEBIAN/control $(DEBSRC)/usr/share/doc/htl-simuc/readme
 
 $(DEBSRC)/DEBIAN/control:
+       @test -d $(DEBSRC)/DEBIAN || mkdir $(DEBSRC)/DEBIAN
        @test -n "${LIBC_NAME}" && test -n "${LIBC_VERSION}"
        @test -n "${LIBCXX_NAME}" && test -n "${LIBCXX_VERSION}"
        @test -n "${LIBELF_NAME}" && test -n "${LIBELF_VERSION}"
index c3fc119c93625c3a19f88d96c9456b54808ae6f4..f054e7c70353bfcfdb1310eed8836019e26d7198 100644 (file)
@@ -433,9 +433,9 @@ struct SimAvrEvent SimAvr::waitForEvent () {
                        rv = *p;
                        if (p->event != EventShutdown) {
                                events.pop_front();
-                               free(p);
+                               free(p); p = NULL;
                        }
-                       if (p->event == EventShutdown) {
+                       if (p != NULL && p->event == EventShutdown) {
                                cancelThread = true;
                                isShutdown = true;
                        }