make sure that mapView is initialized before referencing into it
This commit is contained in:
2
Makefile
2
Makefile
@@ -68,4 +68,4 @@ distclean:
|
||||
test: all
|
||||
echo test
|
||||
|
||||
.PHONY: test
|
||||
.PHONY: test linux
|
||||
|
||||
@@ -207,13 +207,15 @@ public:
|
||||
llmr::Map map;
|
||||
};
|
||||
|
||||
MapView *mapView;
|
||||
MapView *mapView = nullptr;
|
||||
|
||||
namespace llmr {
|
||||
namespace platform {
|
||||
|
||||
void restart(void *) {
|
||||
mapView->dirty = true;
|
||||
if (mapView) {
|
||||
mapView->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@ void warningHandler(png_structp png, png_const_charp error_msg) {
|
||||
}
|
||||
|
||||
void Sprite::loadImage(const std::string& data) {
|
||||
return;
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
|
||||
Buffer buffer(data);
|
||||
|
||||
Reference in New Issue
Block a user