summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2013-10-14 22:01:17 +0200
committerMichael Buesch <m@bues.ch>2013-10-14 22:01:17 +0200
commit272b14d33f0944e45ab7ae92a39cd5d7617c1df4 (patch)
tree5fc4b851b7dfa3d08fa9ac6f3569293512e62d03
parent14d054a561a9e21ad8559dfde62be3bc2c752f97 (diff)
downloadtoprammer-272b14d33f0944e45ab7ae92a39cd5d7617c1df4.tar.xz
toprammer-272b14d33f0944e45ab7ae92a39cd5d7617c1df4.zip
gui: Avoid crash on verify, if buffers are empty
Signed-off-by: Michael Buesch <m@bues.ch>
-rwxr-xr-xtoprammer-gui14
1 files changed, 14 insertions, 0 deletions
diff --git a/toprammer-gui b/toprammer-gui
index 946905a..1596923 100755
--- a/toprammer-gui
+++ b/toprammer-gui
@@ -1834,6 +1834,20 @@ class BufferTabWidget(QTabWidget):
except KeyError:
continue
bufImage = bufferWidget.getRawData()
+ if not bufImage:
+ if not image:
+ # Both images are empty. Go on...
+ continue
+ self.mainWindow.console.showMessage(
+ "Chip verify of %s FAILED! "
+ "There is no data in the "
+ "%s buffer. First load data into "
+ "the buffer tab, please.\n" %\
+ (bufferWidget.getName(),
+ bufferWidget.getName()),
+ bold=True)
+ fail = True
+ continue
if len(bufImage) > len(image):
self.mainWindow.console.showMessage(
"Chip verify of %s FAILED! "
bues.ch cgit interface